/* ============================
   DESIGN SYSTEM
   Brutalist-modern hybrid.
   Big type. High contrast. Bento grid.
   ============================ */
:root {
    --bg: #f5f0eb;
    --bg-dark: #0a0a0a;
    --bg-card: #fff;
    --text: #0a0a0a;
    --text-inv: #f5f0eb;
    --text-mid: #555;
    --text-dim: #999;
    --accent: #1a4fd6;
    --accent2: #ff4d00;
    --green: #00c853;
    --border: #d4cfc8;
    --border-dark: #222;
    --radius: 14px;
    --font: 'Space Grotesk', -apple-system, sans-serif;
    --mono: 'Space Mono', monospace;
    --body: 'Inter', -apple-system, sans-serif;
    --max-w: 1200px;
    --nav-h: 64px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); overflow-x: hidden; }
body { font-family: var(--body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* ============================
   NAV
   ============================ */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
    background: rgba(245, 240, 235, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    border-bottom: 1.5px solid var(--border);
}
.nav-logo img { height: 30px; border-radius: 4px; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-family: var(--font); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em; color: var(--text-mid); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { background: var(--text); color: var(--bg) !important; padding: 0.45rem 1.1rem; border-radius: 100px; font-size: 0.78rem !important; transition: opacity 0.15s !important; }
.nav-cta:hover { opacity: 0.8; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); }
.mobile-menu { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; padding: 1.5rem 2rem; gap: 1.25rem; background: var(--bg); border-bottom: 1.5px solid var(--border); z-index: 99; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--font); font-size: 1rem; font-weight: 500; color: var(--text-mid); }

/* ============================
   HERO — big, bold, grid
   ============================ */
.hero {
    min-height: 100vh;
    padding: var(--nav-h) 2rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.hero-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 380px;
    grid-template-rows: auto auto;
    gap: 2rem;
}

.hero-main { align-self: end; }

.hero-main h1 {
    font-family: var(--font);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.hero-tag {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--text-mid);
    margin-top: 1.25rem;
    letter-spacing: 0.04em;
}

.hero-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-self: center;
}

.hero-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    padding: 0.7rem 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    transition: background 0.15s, border-color 0.15s;
    letter-spacing: -0.01em;
}

.hero-link:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.hero-link:hover svg { stroke: var(--bg); }
.hero-link svg { flex-shrink: 0; }

.hero-photo {
    grid-row: 1 / 3;
    grid-column: 3;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1.5px solid var(--border);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    image-orientation: from-image;
}

.hero-stats {
    display: flex;
    gap: 0;
    align-self: start;
}

.stat-block {
    flex: 1;
    padding: 1.25rem 0;
    border-top: 2px solid var(--text);
}

.stat-block + .stat-block { margin-left: 1.5rem; }

.stat-num {
    font-family: var(--font);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 0.4rem;
    letter-spacing: 0.02em;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1.5px;
    height: 48px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -48px;
    left: 0;
    width: 100%;
    height: 48px;
    background: var(--text);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown { 0% { top: -48px; } 100% { top: 48px; } }

/* ============================
   MARQUEE
   ============================ */
.marquee {
    border-top: 1.5px solid var(--border);
    border-bottom: 1.5px solid var(--border);
    padding: 0.85rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    gap: 2rem;
    animation: marquee 20s linear infinite;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-mid);
}

.marquee-track span { flex-shrink: 0; }

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ============================
   SECTION SYSTEM
   ============================ */
.section { padding: 6rem 0; }
.section-dark { background: var(--bg-dark); color: var(--text-inv); }
.section-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
}
.section-dark .section-label { color: #555; }

/* ============================
   STORY
   ============================ */
.story-section { padding: 3rem 0 0; }

.story {
    font-family: var(--font);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 500;
    line-height: 1.7;
    color: var(--text-mid);
    max-width: 720px;
    letter-spacing: -0.01em;
}

/* ============================
   BENTO GRID
   ============================ */
.bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.bento-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.bento-wide { grid-column: span 2; }

.accent-card {
    background: var(--bg-dark);
    color: var(--text-inv);
    border-color: var(--bg-dark);
}

.dark-card {
    background: #111;
    color: var(--text-inv);
    border-color: #111;
}

.card-callout {
    font-family: var(--font);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.nhl-card {
    background: var(--bg-card);
    padding: 1.5rem 2rem;
}

.nhl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nhl-row p { margin-bottom: 0; }

@media (max-width: 768px) {
    .nhl-row { flex-direction: column; align-items: flex-start; }
}

.card-eyebrow {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.accent-card .card-eyebrow { color: #fff; }
.dark-card .card-eyebrow { color: #666; }
.highlight-card .card-eyebrow { color: var(--accent); }

.bento-card h2 {
    font-family: var(--font);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.bento-card h3 {
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.bento-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-mid);
}

.accent-card p, .dark-card p { color: #888; }

.card-stats-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.mini-stat { display: flex; flex-direction: column; }
.ms-val { font-family: var(--font); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.ms-label { font-family: var(--mono); font-size: 0.62rem; color: #666; letter-spacing: 0.05em; margin-top: 0.1rem; }

.nhl-logos {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.nhl-logos span {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-mid);
    letter-spacing: 0.03em;
}

.accent-card .nhl-logos span, .dark-card .nhl-logos span {
    border-color: #333;
    color: #aaa;
}

/* ============================
   FLAGSHIP PROJECT
   ============================ */
.flagship-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.flagship-header h2 {
    font-family: var(--font);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.flagship-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.flagship-tags span {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border: 1px solid #333;
    border-radius: 100px;
    color: #aaa;
    letter-spacing: 0.03em;
}

.flagship-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.fg-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid #222;
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.2s;
}

.fg-card:hover { border-color: #444; }

.fg-card svg {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    color: var(--accent);
}

.fg-card h4 {
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.fg-card p {
    font-size: 0.8rem;
    line-height: 1.55;
    color: #777;
}

/* Flagship Visuals — surface + terminal side by side */
.flagship-visuals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.flagship-surface {
    background: rgba(255,255,255,0.02);
    border: 1px solid #222;
    border-radius: var(--radius);
    overflow: hidden;
}

.surface-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 10px 14px;
    border-bottom: 1px solid #1a1f2e;
}

#vol-surface {
    width: 100%;
    height: 360px;
}

@media (max-width: 900px) {
    .flagship-visuals { grid-template-columns: 1fr; }
    #vol-surface { height: 300px; }
}

/* Terminal */
.terminal {
    background: #060a10;
    border: 1px solid #1a1f2e;
    border-radius: 10px;
    overflow: hidden;
}

.terminal-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    background: #0c1018;
    border-bottom: 1px solid #1a1f2e;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }
.terminal-title { font-family: var(--mono); font-size: 0.68rem; color: #444; margin-left: 8px; }

.terminal-body {
    padding: 1.25rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.9;
    color: #c9d1d9;
}

.t { white-space: nowrap; opacity: 0; animation: fadeIn 0.2s forwards; }
.t:nth-child(1) { animation-delay: 0.3s; }
.t:nth-child(2) { animation-delay: 0.55s; }
.t:nth-child(3) { animation-delay: 0.85s; }
.t:nth-child(4) { animation-delay: 1.0s; }
.t:nth-child(5) { animation-delay: 1.3s; }
.t:nth-child(6) { animation-delay: 1.45s; }
.t:nth-child(7) { animation-delay: 1.8s; }

@keyframes fadeIn { to { opacity: 1; } }

.td { color: #3a3f4b; }
.tg { color: #34d399; }
.ty { color: #fbbf24; }
.ta { color: #60a5fa; font-weight: 700; }
.cursor { animation: blink 1s step-end infinite; color: #60a5fa; }
@keyframes blink { 50% { opacity: 0; } }

/* ============================
   PROJECT LIST
   ============================ */
.project-list {
    display: flex;
    flex-direction: column;
}

.project-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1.5px solid var(--border);
    transition: padding-left 0.2s;
}

.project-row:first-child { border-top: 1.5px solid var(--border); }

.project-row:hover { padding-left: 0.75rem; }

.pr-name {
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    min-width: 220px;
}

.pr-desc {
    font-size: 0.85rem;
    color: var(--text-mid);
    flex: 1;
}

.pr-status {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    color: var(--text-dim);
    white-space: nowrap;
}

.pr-status.live { color: var(--green); border-color: var(--green); }
.pr-status.active { color: var(--accent); border-color: var(--accent); }


/* ============================
   PHOTO BREAK
   ============================ */
.photo-break {
    position: relative;
    height: 350px;
    overflow: hidden;
}

.photo-break img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    filter: grayscale(30%) contrast(1.1);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        var(--bg) 0%, transparent 20%,
        transparent 80%, var(--bg-dark) 100%);
}

.photo-text {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: #555;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================
   BACKGROUND
   ============================ */
.bg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.bg-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid #222;
    border-radius: var(--radius);
    padding: 2rem;
}

.bg-card-full { grid-column: span 2; }

.bg-card-title {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #555;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #222;
}

.bg-entry { margin-bottom: 1.25rem; }
.bg-entry:last-child { margin-bottom: 0; }

.bg-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}

.bg-org {
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-inv);
}

.bg-date {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: #555;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.bg-role {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.15rem;
}

.bg-meta {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skills-cloud span {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border: 1px solid #333;
    border-radius: 100px;
    color: #aaa;
    letter-spacing: 0.02em;
    transition: border-color 0.15s, color 0.15s;
}

.skills-cloud span:hover { border-color: #888; color: #fff; }

/* ============================
   CONTACT
   ============================ */
.contact { text-align: center; padding: 6rem 0; }

.contact-heading {
    font-family: var(--font);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.contact-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.85rem 1.75rem;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    transition: background 0.15s, border-color 0.15s;
}

.contact-link:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.contact-link:hover svg { stroke: var(--bg); }

.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================
   FOOTER
   ============================ */
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    border-top: 1.5px solid var(--border);
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
}

.footer-logo { height: 18px; border-radius: 3px; opacity: 0.4; }

/* ============================
   SCROLL ANIMATIONS
   ============================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.vis { opacity: 1; transform: translateY(0); }
.stagger .reveal:nth-child(1) { transition-delay: 0s; }
.stagger .reveal:nth-child(2) { transition-delay: 0.07s; }
.stagger .reveal:nth-child(3) { transition-delay: 0.14s; }
.stagger .reveal:nth-child(4) { transition-delay: 0.21s; }
.stagger .reveal:nth-child(5) { transition-delay: 0.28s; }
.stagger .reveal:nth-child(6) { transition-delay: 0.35s; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-links { flex-direction: row; }
    .hero-photo { grid-row: auto; grid-column: auto; max-width: 320px; aspect-ratio: 3/4; }
    .hero-main h1 { font-size: 4rem; }
    .flagship-grid { grid-template-columns: repeat(2, 1fr); }
    .bg-grid { grid-template-columns: 1fr; }
    .bg-card-full { grid-column: span 1; }
    .flagship-header { flex-direction: column; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .section { padding: 4rem 0; }
    .hero-main { padding-top: 1.5rem; }
    .hero-main h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
    .hero-links { flex-direction: row; flex-wrap: wrap; order: 99; }
    .hero-link { padding: 0.5rem 1rem; font-size: 0.78rem; }
    .hero-stats { flex-wrap: wrap; }
    .stat-block + .stat-block { margin-left: 0; }
    .stat-block { flex: 0 0 calc(50% - 0.75rem); }
    .stat-block:nth-child(3), .stat-block:nth-child(4) { margin-top: 0.5rem; }
    .bento { grid-template-columns: 1fr; }
    .bento-wide { grid-column: span 1; }
    .flagship-grid { grid-template-columns: 1fr; }
    .terminal-body { overflow-x: auto; font-size: 0.6rem; }
    .flagship-visuals { overflow: hidden; }
    .flagship-surface, .flagship-terminal { max-width: 100%; overflow: hidden; }
    #vol-surface { height: 260px; }
    .pr-desc { display: none; }
    .pr-name { min-width: auto; flex: 1; }
    .photo-break { height: 240px; }
    .contact-heading { font-size: 3rem; }
    .bg-entry-header { flex-direction: column; gap: 0.15rem; }
    .bg-card-full { display: none; }
    .story { font-size: 1rem; }
    .contact-row { flex-direction: column; align-items: center; }
}
