/* ============================================================
   PORTFOLIO — Newspaper Broadsheet, IBM Plex Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* --- Variables --- */
:root {
    --bg: rgb(251, 247, 236);

    --text-primary: #1a1a16;
    --text-secondary: #4a4a40;
    --text-muted: #8a8a7a;

    --border-color: #1a1a16;
    --border: 1px dashed var(--border-color);
    --border-light: 1px dashed #b0aa98;
    --border-strong: 2px solid var(--border-color);
    --border-double: 3px double var(--border-color);

    --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'SF Mono', monospace;

    --radius: 8px;

    --container: 1080px;
    --gap-section: 72px;
    --transition: 180ms ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 3px;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.65;
}

::selection {
    background: rgba(26, 26, 22, 0.12);
}

/* --- Container --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

/* --- Section Label --- */
.section-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 28px;
}

/* --- Dividers --- */
.hr {
    border: none;
    border-top: var(--border-strong);
    margin: var(--gap-section) auto;
    width: 60%;
}

.hr--solid {
    border-top: var(--border-strong);
}

.hr--double {
    border-top: var(--border-double);
}

/* --- Fade In (disabled — all sections visible immediately) --- */
.fade-in {
    opacity: 1;
    transform: none;
}

/* ============================================================
   COVER PHOTO / VIDEO
   ============================================================ */
.cover-photo {
    padding: 0 0 24px;
    width: 100%;
    overflow: hidden;
}

.cover-photo__img {
    display: block;
    width: 100%;
    max-height: 624px;
    min-height: 280px;
    object-fit: cover;
    object-position: center 33%;
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
    padding: 40px 0 28px;
    text-align: center;
}

.masthead__name-row {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    margin-bottom: 12px;
}

.masthead__linkedin {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0.5;
    transition: opacity var(--transition);
    position: relative;
    /* size relative to the name — scales with clamp */
    width: clamp(28px, 3.5vw, 46px);
    height: clamp(28px, 3.5vw, 46px);
}

.masthead__linkedin:hover {
    opacity: 1;
}

.masthead__linkedin svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: opacity 200ms ease;
}

.masthead__linkedin .li-outline {
    opacity: 1;
    fill: none;
    stroke: currentColor;
    stroke-width: 0.75;
}

.masthead__linkedin .li-filled {
    fill: currentColor;
    opacity: 0;
}

.masthead__linkedin:hover .li-outline {
    opacity: 0;
}

.masthead__linkedin:hover .li-filled {
    opacity: 1;
}

.masthead__name {
    font-family: var(--font-mono);
    font-size: clamp(52px, 7vw, 84px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1;
    color: var(--text-primary);
}

.masthead__tagline {
    font-family: var(--font-mono);
    font-size: clamp(20px, 3vw, 40px);
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.15;
    color: var(--text-secondary);
}

.masthead__rule-wrapper {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

.masthead__rule {
    border: none;
    border-top: var(--border-double);
    margin: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 0 0 var(--gap-section);
}

.hero__inner {
    max-width: 680px;
}

.hero__inner--centered {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Hero Rule */
.hero__rule {
    border: none;
    border-top: var(--border-strong);
    width: 60%;
    margin: 0 auto 28px;
}

/* Photo Widget */
.photo-widget {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-widget__glow {
    display: none;
}

.photo-widget__mask {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.photo-widget__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.18);
    transition: transform 0.1s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
    border: none;
    outline: none;
    filter: contrast(1.08) grayscale(0.05);
}

.photo-widget__tooltip {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--text-primary);
    color: var(--bg);
    padding: 4px 12px;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    white-space: nowrap;
    z-index: 10;
}

.photo-widget:hover .photo-widget__tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Hero Bio */
.hero__bio {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 22px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all var(--transition);
    border: var(--border);
    color: var(--text-secondary);
    background: transparent;
}

.hero__link:hover {
    color: var(--text-primary);
    opacity: 1;
    border-style: solid;
}

.hero__link--primary {
    border-style: solid;
    border-color: var(--text-primary);
    color: var(--text-primary);
    font-weight: 600;
}

.hero__link--primary:hover {
    background: var(--text-primary);
    color: var(--bg);
}

.hero__link svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

/* ============================================================
   SECTIONS GRID
   ============================================================ */
.sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "career     education"
        "products   experimental"
        "consulting consulting";
    gap: 0;
    background: transparent;
    border: var(--border);
    border-radius: var(--radius);
}

.section-box {
    background: var(--bg);
    padding: 36px 40px;
    position: relative;
}

/* Inset inner dividers — don't touch outer border */
.section-box--career::before,
.section-box--career::after,
.section-box--education::after,
.section-box--products::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

/* Career: right vertical divider */
.section-box--career::after {
    right: 0;
    top: 20px;
    bottom: 20px;
    width: 0;
    border-right: 1px dashed var(--border-color);
}

/* Career: bottom horizontal divider */
.section-box--career::before {
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 0;
    border-bottom: 1px dashed var(--border-color);
}

/* Education: bottom horizontal divider */
.section-box--education::after {
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 0;
    border-bottom: 1px dashed var(--border-color);
}

/* Products: right vertical divider */
.section-box--products::after {
    right: 0;
    top: 20px;
    bottom: 20px;
    width: 0;
    border-right: 1px dashed var(--border-color);
}

.section-box--career {
    grid-area: career;
}

.section-box--education {
    grid-area: education;
}

.section-box--products {
    grid-area: products;
}

.section-box--experimental {
    grid-area: experimental;
}

.section-box--consulting {
    grid-area: consulting;
}

.section-box__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: var(--border-light);
}

.section-box__hd-text {
    flex: 1;
    min-width: 0;
}

.section-box__hd-text .section-title {
    margin-bottom: 0;
}

.section-box__placeholder {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 0.5px;
}

.section-box__corner-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.72;
    filter: grayscale(0.15) contrast(1.05);
    flex-shrink: 0;
}

.section-box--products .section-box__corner-img {
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.exp-item {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: var(--border-light);
}

.exp-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.exp-item__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 3px;
}

.exp-item__company {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 9px;
}

.exp-item__company-icon {
    height: 20px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.exp-item__years {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.exp-item__role {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-style: italic;
}

.mit-edu-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mit-edu-block__img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.8;
    filter: grayscale(0.15) contrast(1.05);
    flex-shrink: 0;
}

.mit-edu-block .exp-item__role {
    margin-bottom: 0;
}

.exp-project {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    margin-top: 8px;
}

.exp-project:hover {
    border-style: solid;
}

.exp-project__brand-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 3px;
    margin-top: 2px;
    opacity: 0.85;
}

.exp-project__text {
    flex: 1;
    min-width: 0;
}

.exp-project__title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.exp-project__desc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.exp-project__arrow {
    font-size: 14px;
    color: var(--text-muted);
    align-self: center;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.exp-project:hover .exp-project__arrow {
    transform: translateX(3px);
    color: var(--text-primary);
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-card {
    padding: 20px 22px;
    border-radius: var(--radius);
    border: var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    transition: all var(--transition);
}

.product-card:hover {
    border-style: solid;
    opacity: 1;
}

.product-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.product-card__name {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.product-card__tag {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 4px;
    border: var(--border-light);
    color: var(--text-muted);
}

.product-card__desc {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.product-card__url {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    transition: color var(--transition);
}

.product-card:hover .product-card__url {
    color: var(--text-primary);
}

.product-card__logo {
    position: absolute;
    bottom: 18px;
    right: 20px;
    height: 36px;
    width: auto;
    opacity: 0.8;
    transition: opacity var(--transition);
    pointer-events: none;
}

.product-card:hover .product-card__logo {
    opacity: 1;
}

/* ============================================================
   CONSULTING
   ============================================================ */
.consulting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.consulting-card {
    padding: 18px 20px;
    border-radius: var(--radius);
    border: var(--border-light);
    transition: all var(--transition);
}

.consulting-card:hover {
    border-color: var(--border-color);
}

.consulting-card__title {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 7px;
}

.consulting-card__desc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

.consulting-card__tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================================
   AWARDS — grid of bordered cells
   ============================================================ */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    border-top: var(--border);
    border-left: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.award-item {
    padding: 20px;
    border-right: var(--border);
    border-bottom: var(--border);
    transition: background var(--transition);
}

.award-item:hover {
    background: rgba(26, 26, 22, 0.04);
}

.award-item__year {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.award-item__title {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.award-item__org {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 36px 0;
    text-align: center;
    border-top: var(--border);
    margin-top: var(--gap-section);
}

.footer__text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .hero__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 28px;
    }

    .hero__bio {
        margin: 0 auto 28px;
    }

    .hero__links {
        justify-content: center;
    }

    .photo-widget {
        width: 200px;
        height: 200px;
    }

    .sections-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "career"
            "education"
            "products"
            "experimental"
            "consulting";
    }

    .section-box {
        padding: 28px 24px;
    }

    .awards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .container {
        padding: 0 20px;
    }

    .masthead__name {
        font-size: 42px;
    }

    .section-title {
        font-size: 24px;
    }

    .photo-widget {
        width: 160px;
        height: 160px;
    }

    .awards-grid {
        grid-template-columns: 1fr;
    }
}