/* Blueprint — technical drafting theme */
:root {
    --bg-main: #0D2438;
    --bg-card: #123049;
    --bg-alt: #0F2A40;
    --accent: #E8935C;
    --accent-hover: #d97f45;
    --text-main: #EAF2F8;
    --text-muted: #9DB4C7;
    --border: #2A4A63;
    --border-soft: #1B3752;
    --radius: 3px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    font-size: 15px;
    background-image:
        linear-gradient(var(--border-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: -1px -1px;
    counter-reset: section-num;
}

h1, h2, h3 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Corner registration marks */
.crosshair {
    position: fixed;
    width: 22px; height: 22px;
    pointer-events: none;
    opacity: 0.5;
    z-index: 500;
}
.crosshair::before, .crosshair::after {
    content: "";
    position: absolute;
    background: var(--text-muted);
}
.crosshair::before { width: 100%; height: 1px; top: 50%; }
.crosshair::after { width: 1px; height: 100%; left: 50%; }
.crosshair.tl { top: 20px; left: 20px; }
.crosshair.tr { top: 20px; right: 20px; }
.crosshair.bl { bottom: 20px; left: 20px; }
.crosshair.br { bottom: 20px; right: 20px; }
@media (max-width: 768px) { .crosshair { display: none; } }

/* Navbar */
.navbar {
    border-bottom: 1px solid var(--border);
    background: rgba(13, 36, 56, 0.85);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.2rem;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid transparent;
    padding-bottom: 3px;
    transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.menu-toggle span {
    display: block;
    height: 1px;
    width: 100%;
    background: var(--text-main);
    transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero {
    padding: 8rem 0 5rem 0;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.hero-container {
    max-width: 760px;
    margin: 0 auto;
}
.badge {
    display: inline-block;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin: 1.5rem 0;
}
.hero-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 60ch;
    margin-bottom: 2.5rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.15s;
    font-size: 0.85rem;
}
.btn-primary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-dim, var(--accent));
    padding: 0.75rem 1.6rem;
}
.btn-primary:hover { color: var(--text-main); border-color: var(--text-main); }
.btn-secondary {
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 1.6rem;
    margin-left: 1rem;
    background: transparent;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary-sm {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
}
.btn-primary-sm:hover { border-color: var(--accent); }

.highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
    transition: color 0.15s, border-color 0.15s;
}
.highlight-badge:hover { color: var(--accent); border-color: var(--accent); }
.badge-icon { font-size: 0.7rem; }

/* Social link groups */
.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem;
}
.social-links .btn-secondary { margin-left: 0; }

.center { margin-left: auto; margin-right: auto; }
.text-center { text-align: left; }
.text-center .section-title { margin-left: 0; margin-right: 0; }

/* Metrics Bar */
.metrics-bar {
    display: flex;
    justify-content: flex-start;
    gap: 4rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    background: var(--bg-card);
}
.metric-item { text-align: left; }
.metric-item strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}
.metric-item span {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.metrics-bar .container,
.metrics-bar { padding-left: 5%; padding-right: 5%; }

/* Sections & headings */
.section { padding: 5rem 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }
.alt-bg { background-color: var(--bg-alt); }

.section-title {
    counter-increment: section-num;
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 1.5rem;
    margin-bottom: 3rem;
}
.section-title::before {
    content: counter(section-num, decimal-leading-zero) " —";
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    white-space: nowrap;
    font-weight: 500;
}
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* Cards — flat hairline, no shadow, minimal radius */
.card {
    background: transparent;
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
}
.card-icon {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
}
.card h3 { margin-bottom: 0.85rem; font-size: 1.05rem; font-family: 'Fraunces', serif; }
.card p { color: var(--text-muted); font-size: 0.88rem; }

/* Project Cards */
.project-card {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s;
}
.project-card:hover { border-color: var(--accent); }
.project-img {
    height: 190px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    filter: grayscale(0.3) contrast(1.05);
}
.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.project-content { padding: 1.75rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-tag {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    display: block;
}
.project-content h3 { margin-bottom: 0.85rem; font-size: 1.1rem; }
.project-content p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1.5rem; flex-grow: 1; }
.project-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
    width: fit-content;
}
.project-link:hover { color: var(--accent); border-color: var(--accent); }

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2.5rem;
    align-items: start;
}
.about-photo img {
    width: 180px;
    height: 180px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--border);
    filter: grayscale(0.4);
}
.about-text p { color: var(--text-muted); margin-bottom: 1.1rem; font-size: 0.92rem; }
.about-social { margin-top: 1.5rem; justify-content: flex-start; }

/* Scroll reveal — kept minimal per reduced-motion intent */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Featured Card */
.featured-card {
    display: flex;
    align-items: stretch;
    margin-top: 1.5rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.featured-visual {
    flex: 0 0 200px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border);
}
.featured-visual i { font-size: 2.6rem; color: var(--accent); }
.featured-card figcaption {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}
.featured-card figcaption .project-tag { margin-bottom: 0.25rem; }
.featured-card figcaption h3 { font-size: 1.1rem; }
.featured-card figcaption p { color: var(--text-muted); font-size: 0.88rem; }
.featured-view {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.82rem;
    margin-top: 0.4rem;
}
@media (max-width: 640px) {
    .featured-card { flex-direction: column; }
    .featured-visual { flex-basis: 100px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* Gallery */
.gallery-grid { gap: 1.25rem; }
.gallery-item {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0;
    transition: border-color 0.15s;
}
.gallery-item:hover { border-color: var(--accent); }
.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    filter: grayscale(0.35);
}
.gallery-item figcaption {
    padding: 0.9rem 1.1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Case Study Pages */
.case-study { max-width: 700px; padding: 5rem 0 4rem; }
.case-study .back-link { color: var(--accent); text-decoration: none; font-weight: 500; font-size: 0.85rem; }
.case-study .back-link:hover { text-decoration: underline; }
.case-study .project-tag { display: inline-block; margin-top: 2rem; }
.case-study h1 { font-size: 2rem; margin: 0.5rem 0 1rem; }
.case-study .lead {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2.25rem;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}
.case-study h3 { margin-top: 2.25rem; margin-bottom: 0.65rem; font-size: 1.05rem; }
.case-study p, .case-study li { color: var(--text-muted); font-size: 0.92rem; }
.case-study ul { margin-left: 1.4rem; padding-top: 0.25rem; }
.case-study ul li { margin-bottom: 0.4rem; }
.case-study strong { color: var(--text-main); }
.case-study > .back-link:last-of-type { display: inline-block; margin-top: 3rem; }

/* Footer */
footer {
    text-align: left;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero-cta .btn-secondary { margin-left: 0; margin-top: 1rem; display: inline-flex; }
    .about-grid { grid-template-columns: 1fr; text-align: left; }
    .about-social { justify-content: flex-start; }

    .menu-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav-links.open { max-height: 300px; }
    .nav-links li { width: 100%; padding: 0.9rem 5%; border-top: 1px solid var(--border); }
    .nav-links li:first-child { border-top: none; }
}
