/* ============================================================
   JACOB HONICK — PORTFOLIO
   Theme: ASME Y14 Engineering Drawing Border
   Fonts: Inter (UI) + JetBrains Mono (technical)
   ============================================================ */

:root {
    --navy: #1B2A4A;
    --navy-light: #2C3E5A;
    --red: #C41E3A;
    --red-dark: #9B1B30;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --border-color: #222;
    --border-thin: 0.5px solid var(--border-color);
    --border-med: 1.5px solid var(--border-color);
    --border-thick: 2.5px solid var(--border-color);
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --zone-size: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background: var(--gray-200);
    color: var(--navy);
    line-height: 1.6;
    padding: 1.5rem;
}

a {
    color: var(--red);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--red-dark);
}

/* ============================================================
   DRAWING BORDER — ASME Y14 STYLE
   ============================================================ */

.drawing-frame {
    max-width: 1440px;
    margin: 0 auto;
    background: var(--white);
    display: flex;
    flex-direction: column;
}

/* --- Top Zone Bar (numbers 1-8) --- */
.zone-bar-top, .zone-bar-bottom {
    display: flex;
    border-left: var(--border-thick);
    border-right: var(--border-thick);
}

.zone-bar-top {
    border-top: var(--border-thick);
    border-bottom: var(--border-med);
}

.zone-bar-bottom {
    border-bottom: var(--border-thick);
    border-top: var(--border-med);
}

.zone-bar-top .zone-cell,
.zone-bar-bottom .zone-cell {
    flex: 1;
    text-align: center;
    padding: 3px 0;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--border-color);
    border-right: var(--border-thin);
    height: var(--zone-size);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-bar-top .zone-cell:last-child,
.zone-bar-bottom .zone-cell:last-child {
    border-right: none;
}

/* --- Middle section: side zones + content --- */
.drawing-middle {
    display: flex;
    border-left: var(--border-thick);
    border-right: var(--border-thick);
    min-height: 80vh;
}

/* Side zone columns (letters A-E) */
.zone-col-left, .zone-col-right {
    width: var(--zone-size);
    min-width: var(--zone-size);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.zone-col-left {
    border-right: var(--border-med);
}

.zone-col-right {
    border-left: var(--border-med);
}

.zone-col-left .zone-cell,
.zone-col-right .zone-cell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--border-color);
    border-bottom: var(--border-thin);
}

.zone-col-left .zone-cell:last-child,
.zone-col-right .zone-cell:last-child {
    border-bottom: none;
}

/* Main content area */
.drawing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ============================================================
   TITLE BLOCK (Bottom of drawing)
   ============================================================ */

.title-block-area {
    border-top: var(--border-med);
    display: grid;
    grid-template-columns: 1fr auto auto;
    font-family: var(--font-mono);
    font-size: 0.65rem;
}

/* Left: Tolerances / general notes */
.tb-notes {
    padding: 0.5rem 0.75rem;
    border-right: var(--border-med);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.tb-notes p {
    color: var(--gray-700);
    font-size: 0.6rem;
    line-height: 1.4;
}

.tb-notes .tb-notes-title {
    font-weight: 700;
    font-size: 0.6rem;
    color: var(--border-color);
    margin-bottom: 0.15rem;
}

/* Middle: Units block */
.tb-units {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-right: var(--border-med);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--border-color);
}

/* Right: Info block (drawn, checked, title, etc.) */
.tb-info {
    display: flex;
    flex-direction: column;
    min-width: 280px;
}

.tb-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: var(--border-thin);
}

.tb-info-row:last-child {
    border-bottom: none;
}

.tb-info-cell {
    padding: 0.25rem 0.5rem;
    border-right: var(--border-thin);
    display: flex;
    flex-direction: column;
}

.tb-info-cell:last-child {
    border-right: none;
}

.tb-info-cell .tb-label {
    font-size: 0.5rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tb-info-cell .tb-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--border-color);
}

.tb-title-row {
    border-bottom: none;
    padding: 0.4rem 0.5rem;
}

.tb-title-row .tb-label {
    font-size: 0.5rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tb-title-row .tb-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--border-color);
}

/* ============================================================
   REVISION HISTORY (Top-right, inside content)
   ============================================================ */

.rev-history {
    border-bottom: var(--border-med);
    font-family: var(--font-mono);
    font-size: 0.6rem;
}

.rev-history-title {
    text-align: center;
    font-weight: 500;
    font-size: 0.5rem;
    padding: 0.15rem;
    border-bottom: var(--border-thin);
    color: var(--gray-500);
    letter-spacing: 0.05em;
}

.rev-history table {
    width: 100%;
    border-collapse: collapse;
}

.rev-history th, .rev-history td {
    padding: 0.2rem 0.4rem;
    border: var(--border-thin);
    text-align: center;
    font-size: 0.55rem;
}

.rev-history th {
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.rev-history td {
    color: var(--gray-700);
}

/* ============================================================
   MAIN PAGE CONTENT (inside the drawing area)
   ============================================================ */

.page-content {
    flex: 1;
    padding: 0;
}

/* Header inside drawing */
.page-header {
    padding: 1rem 2.5rem 0.75rem;
    border-bottom: var(--border-thin);
}

.page-header .name {
    font-family: var(--font-ui);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--navy);
    margin-bottom: 0.1rem;
}

.page-header .discipline {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    font-weight: 500;
    color: var(--red);
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.page-header .motto {
    font-style: italic;
    font-size: 0.75rem;
    color: var(--gray-600);
    letter-spacing: 0.05em;
}

/* Navigation */
.nav-bar {
    display: flex;
    border-bottom: var(--border-med);
    background: var(--navy);
}

.nav-link {
    flex: 1;
    text-align: center;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-right: 1px solid var(--navy-light);
    transition: background 0.2s, color 0.2s;
}

.nav-link:last-child {
    border-right: none;
}

.nav-link:hover {
    background: var(--red);
    color: var(--white);
}

/* Sections */
.section {
    padding: 1.5rem 2.5rem;
    border-bottom: var(--border-thin);
}

.section:last-child {
    border-bottom: none;
}

.section-title {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-right: 0.75rem;
}

/* ============================================================
   GALLERY
   ============================================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27, 42, 74, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(transparent, rgba(27, 42, 74, 0.85));
    color: var(--white);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 42, 74, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border: 3px solid var(--white);
}

.lightbox-caption {
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;
    font-size: 3rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3.5rem;
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3.5rem;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-content {
    max-width: 720px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.about-content p {
    margin-bottom: 1.25rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   RESUME
   ============================================================ */

.resume-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.resume-group {
    margin-bottom: 1.75rem;
}

.resume-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--navy);
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--gray-300);
}

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

.resume-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.2rem 0;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.resume-list .years {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gray-500);
    white-space: nowrap;
    margin-left: 0.5rem;
}

.edu-entry {
    font-size: 0.8rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.edu-entry strong {
    color: var(--navy);
}

/* Experience */
.exp-entry {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

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

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.2rem;
}

.exp-company {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
}

.exp-dates {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--red);
    font-weight: 500;
}

.exp-role {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.exp-bullets {
    list-style: none;
    padding-left: 0;
}

.exp-bullets li {
    font-size: 0.82rem;
    color: var(--gray-700);
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.exp-bullets li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--red);
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact-content {
    text-align: center;
}

.contact-content > p {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.contact-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    transition: border-color 0.2s, color 0.2s;
}

a.contact-link:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .resume-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .title-block-area {
        grid-template-columns: 1fr;
    }

    .tb-units {
        border-right: none;
        border-bottom: var(--border-med);
    }

    .tb-notes {
        border-right: none;
        border-bottom: var(--border-med);
    }
}

@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.5rem;
    }

    .nav-bar {
        flex-wrap: wrap;
    }

    .nav-link {
        flex: none;
        width: 50%;
        border-right: none;
        border-bottom: 1px solid var(--navy-light);
    }

    .zone-bar-top, .zone-bar-bottom {
        display: none;
    }

    .zone-col-left, .zone-col-right {
        display: none;
    }

    .drawing-middle {
        border-left: var(--border-thick);
        border-right: var(--border-thick);
    }
}
