/* ==========================================================================
   INFRASTRUCTURE & PORTFOLIO ENGINE
   ========================================================================== */

/* CASE STUDY (INDEX PREVIEW) */
.case-study { padding: var(--section-pad); background: var(--surface); border-top: 1px solid #1a1a1a; }
.case-header { margin-bottom: 50px; }
.case-header .num { font-family: var(--font-mono); color: var(--accent); font-size: 0.75rem; display: block; margin-bottom: 8px; }
.case-header h2 { font-size: 2.5rem; font-weight: 900; letter-spacing: -1px; }

.case-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: start; }

/* BROWSER MOCKUP FRAME */
.mockup-frame { background: #000; border: 1px solid #222; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.4); }
.mockup-header { background: #151515; padding: 8px 15px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #222; }
.dots { display: flex; gap: 5px; }
.dots span { width: 6px; height: 6px; background: #333; border-radius: 50%; }
.url { font-family: var(--font-mono); font-size: 0.5rem; color: #444; background: #0a0a0a; padding: 3px 12px; border-radius: 2px; flex: 1; text-align: center; }

.mockup-screen { height: 380px; background: #000 url('../logo.png') center no-repeat; background-size: 120px; position: relative; }
.blueprint-overlay { position: absolute; bottom: 15px; right: 15px; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); padding: 12px; border-left: 2px solid var(--accent); font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent); line-height: 1.6; }

/* LOGIC BLOCKS */
.logic-block { margin-bottom: 30px; }
.logic-block .label { font-family: var(--font-mono); font-size: 0.55rem; color: var(--accent); margin-bottom: 6px; display: block; font-weight: bold; }
.logic-block p { color: var(--text-dim); line-height: 1.5; font-size: 0.9rem; }
.link-external { color: white; text-decoration: none; font-weight: 800; border-bottom: 1px solid var(--accent); padding-bottom: 20px; font-size: 0.75rem; text-transform: uppercase; transition: all 0.2s; letter-spacing: 1px; }
.link-external:hover { color: var(--accent); border-bottom-width: 2px; }

/* PORTFOLIO CATALOG PAGE HEADER - START ALIGNED */
.portfolio-header {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    border-bottom: 1px solid #1a1a1a;
    text-align: left; /* FORCE START ALIGNMENT */
}

.portfolio-grid-section { padding: 100px 0; }
.matrix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.matrix-item { background: var(--surface); border: 1px solid #222; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; }
.matrix-item:hover { border-color: var(--accent); transform: translateY(-5px); }

.matrix-visual { height: 250px; background: #000 center no-repeat; border-bottom: 1px solid #222; }
.matrix-info { padding: 30px; }
.matrix-info .cat { font-family: var(--font-mono); font-size: 0.6rem; color: var(--accent); font-weight: bold; margin-bottom: 10px; display: block; }
.matrix-info h3 { font-size: 1.4rem; margin-bottom: 10px; }
.matrix-info p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 25px; }
.matrix-meta { display: flex; justify-content: space-between; border-top: 1px solid #222; padding-top: 15px; font-family: var(--font-mono); font-size: 0.55rem; color: #555; text-transform: uppercase; }

.matrix-item.muted { opacity: 0.4; cursor: default; }

@media (max-width: 768px) {
    .case-grid { grid-template-columns: 1fr; }
    .matrix-grid { grid-template-columns: 1fr; }
}