/* ============================================================
   Company section (home page). Shares the backdrop and tokens of the
   Technology section (css/tech.css). Layout: one wide chamfered founder
   panel, then a single row of six chamfered department tiles.
   ============================================================ */

.co-v3 {
    text-align: left;
}

/* ── Founder panel ─────────────────────────────────────────────────── */

.co-profile {
    --cut: 30px;
    --cut-big: 64px;
    position: relative;
    padding: 1px;
    background: var(--tk-edge);
    clip-path: polygon(var(--cut-big) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut-big));
}

.co-profile-inner {
    position: relative;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 32px;
    padding: 28px 40px 28px 30px;
    background:
        radial-gradient(ellipse at 14% 50%, rgba(120, 140, 255, 0.10) 0%, rgba(0, 0, 0, 0) 55%),
        linear-gradient(160deg, var(--tk-card) 0%, var(--tk-card-2) 100%);
    clip-path: polygon(var(--cut-big) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut-big));
    overflow: hidden;
}

/* Corner ticks, as on the Technology cards. */
.co-profile-inner::before,
.co-profile-inner::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 0 solid rgba(160, 190, 255, 0.45);
    pointer-events: none;
    z-index: 2;
}

.co-profile-inner::before {
    top: 10px;
    right: 10px;
    border-top-width: 2px;
    border-right-width: 2px;
}

.co-profile-inner::after {
    bottom: 10px;
    left: 10px;
    border-bottom-width: 2px;
    border-left-width: 2px;
}

/* Event photo, fading in from the right edge of the panel. */
.co-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 58%;
    background: center 30% / cover no-repeat;
    opacity: 0.42;
    filter: saturate(0.55) contrast(1.05);
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 45%, #000 100%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 45%, #000 100%);
    pointer-events: none;
}

.co-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 12, 29, 0.1) 0%, rgba(11, 12, 29, 0.85) 100%);
}

html[data-theme="light"] .co-photo {
    opacity: 0.2;
    filter: saturate(0.4);
}

html[data-theme="light"] .co-photo::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.85) 100%);
}

/* Chamfered portrait with the same 1px gradient edge. */
.co-portrait {
    --pcut: 26px;
    position: relative;
    z-index: 1;
    padding: 1px;
    background: var(--tk-edge);
    clip-path: polygon(var(--pcut) 0, 100% 0, 100% calc(100% - var(--pcut)), calc(100% - var(--pcut)) 100%, 0 100%, 0 var(--pcut));
    align-self: start;
}

/* The frame owns the chamfer and backdrop so the photo can be reframed
   inside it (zoomed in, pulled up) without touching the image file. */
.co-portrait-frame {
    display: block;
    width: 100%;
    aspect-ratio: 1000 / 1404;
    overflow: hidden;
    clip-path: polygon(var(--pcut) 0, 100% 0, 100% calc(100% - var(--pcut)), calc(100% - var(--pcut)) 100%, 0 100%, 0 var(--pcut));
    /* The headshot is cut out, so this is the backdrop behind it. */
    background:
        radial-gradient(ellipse at 50% 35%, rgba(125, 211, 252, 0.18) 0%, rgba(0, 0, 0, 0) 65%),
        linear-gradient(180deg, #151833 0%, #0b0c1d 100%);
}

.co-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Zoom in a touch and lift the head so it sits higher in the frame. */
    transform: scale(1.09) translateY(-6.8%);
    transform-origin: 50% 0;
}

html[data-theme="light"] .co-portrait-frame {
    background:
        radial-gradient(ellipse at 50% 35%, rgba(56, 140, 220, 0.16) 0%, rgba(0, 0, 0, 0) 65%),
        linear-gradient(180deg, #e9ecfa 0%, #d7dcf2 100%);
}

.co-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 640px;
    padding-top: 6px;
}

.co-kicker {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #7dd3fc;
    margin-bottom: 10px;
}

html[data-theme="light"] .co-kicker {
    color: #0b6fa8;
}

.co-name {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3vw, 3.1rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: 0.01em;
    margin: 0 0 12px;
    color: var(--tk-text);
}

.co-name a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.co-name a:hover {
    color: #7dd3fc;
    text-decoration: none;
}

html[data-theme="light"] .co-name a:hover {
    color: #0b6fa8;
}

/* Small facts in a row, divided by thin rules. */
.co-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: 1.02rem;
    color: var(--tk-muted);
}

.co-meta li {
    padding: 2px 14px;
    border-left: 1px solid var(--tk-line);
}

.co-meta li:first-child {
    padding-left: 0;
    border-left: 0;
}

.co-meta strong {
    font-weight: 600;
    color: var(--tk-text);
    margin-right: 0.3em;
}

.co-blurb {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--tk-muted);
    margin: 0 0 10px;
}

.co-copy .tk-actions {
    margin-top: auto;
    padding-top: 12px;
}

/* ── Department row ────────────────────────────────────────────────── */

.co-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 22px 0 10px;
}

.co-row-title {
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--tk-text);
}

.co-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.co-tile {
    --tcut: 20px;
    position: relative;
    display: block;
    padding: 1px;
    background: var(--tk-edge);
    clip-path: polygon(var(--tcut) 0, 100% 0, 100% calc(100% - var(--tcut)), calc(100% - var(--tcut)) 100%, 0 100%, 0 var(--tcut));
    color: var(--tk-text);
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.co-tile:hover,
.co-tile:focus-visible {
    background: var(--tk-edge-hover);
    transform: translateY(-2px);
    color: var(--tk-text);
    text-decoration: none;
    outline: none;
}

.co-tile-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 176px;
    padding: 14px 16px 16px;
    background: linear-gradient(160deg, var(--tk-card) 0%, var(--tk-card-2) 100%);
    clip-path: polygon(var(--tcut) 0, 100% 0, 100% calc(100% - var(--tcut)), calc(100% - var(--tcut)) 100%, 0 100%, 0 var(--tcut));
}

/* Faint department number filling the top-right corner. */
.co-tile-inner::before {
    content: attr(data-index);
    position: absolute;
    top: 4px;
    right: 12px;
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: rgba(160, 190, 255, 0.10);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.co-tile:hover .co-tile-inner::before {
    color: rgba(160, 190, 255, 0.2);
}

html[data-theme="light"] .co-tile-inner::before {
    color: rgba(40, 60, 140, 0.08);
}

html[data-theme="light"] .co-tile:hover .co-tile-inner::before {
    color: rgba(40, 60, 140, 0.16);
}

.co-tile-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    margin-bottom: 26px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7dd3fc;
}

html[data-theme="light"] .co-tile-top {
    color: #0b6fa8;
}

.co-status {
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid var(--tk-tile-border);
    color: var(--tk-muted);
    letter-spacing: 0.14em;
}

.co-tile-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.42rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--tk-text);
}

.co-tile-title {
    display: block;
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 0.96rem;
    line-height: 1.25;
    color: var(--tk-muted);
}

.co-tile-foot {
    display: block;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--tk-line);
}

.co-tile-lead {
    display: block;
    font-family: var(--font-display);
    font-size: 0.98rem;
    color: var(--tk-text);
}

.co-tile-since {
    display: block;
    font-family: var(--font-display);
    font-size: 0.86rem;
    color: var(--tk-muted);
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 1399.98px) {
    .co-tile-inner::before {
        font-size: 3rem;
    }
}

@media (max-width: 1199.98px) {
    .co-profile-inner {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 26px;
        padding: 24px 30px 24px 24px;
    }

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

    .co-tile-inner {
        min-height: 160px;
    }
}

@media (max-width: 767.98px) {
    .co-profile {
        --cut: 22px;
        --cut-big: 30px;
    }

    .co-profile-inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px 18px 22px;
    }

    .co-photo {
        width: 100%;
        opacity: 0.22;
        -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 70%);
        mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 70%);
    }

    .co-portrait {
        width: 58%;
        max-width: 220px;
        --pcut: 20px;
    }

    .co-copy {
        max-width: none;
        padding-top: 0;
    }

    .co-meta {
        flex-direction: column;
        gap: 2px;
    }

    .co-meta li {
        padding: 0;
        border-left: 0;
    }

    .co-copy .tk-actions .tk-btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .co-row-head {
        margin: 18px 0 10px;
    }

    .co-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .co-tile {
        --tcut: 16px;
    }

    .co-tile-inner {
        min-height: 150px;
        padding: 12px 12px 14px;
    }

    .co-tile-inner::before {
        font-size: 2.6rem;
    }

    .co-tile-top {
        margin-bottom: 18px;
    }

    .co-tile-name {
        font-size: 1.28rem;
    }
}

@media (max-width: 419.98px) {
    .co-grid {
        grid-template-columns: 1fr;
    }

    .co-tile-inner {
        min-height: 0;
    }

    .co-tile-top {
        margin-bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .co-tile,
    .co-name a {
        transition: none;
    }

    .co-tile:hover {
        transform: none;
    }
}
