/* =========================================================
   DENNIS MAAGA — RESEARCH & TECHNICAL REPORTING
   Design concept: a "spec sheet" — the visual language of a
   lab report / instrument readout. Monospace carries data and
   metadata (sample IDs, method labels); a geometric sans
   carries headlines; a humanist sans carries body copy.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    /* --- color tokens --- */
    --ink: #14181c;
    --ink-soft: #4b555d;
    --muted: #7c8791;
    --paper: #faf9f6;
    --panel: #f0efe9;
    --line: #dcdcd4;
    --accent: #1f6f5c;       /* lab-glass teal */
    --accent-soft: #e3ede9;
    --tag: #b4571e;          /* caution-label rust, used sparingly */
    --tag-soft: #f4e5da;
    --ink-invert: #f4f2ec;

    /* --- type tokens --- */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* --- elevation tokens --- */
    --shadow-sm: 0 1px 2px rgba(20, 24, 28, 0.06);
    --shadow-md: 0 8px 24px rgba(20, 24, 28, 0.08);
    --shadow-lg: 0 20px 45px rgba(20, 24, 28, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.6;
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

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

/* mono "tag" used throughout for labels/metadata */
.tag {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

/* =============== HEADER / NAV =============== */

header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow 0.2s ease;
}

header.scrolled {
    box-shadow: var(--shadow-sm);
}

nav {
    width: 90%;
    max-width: 1120px;
    margin: auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.06em;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links .button {
    padding: 9px 18px;
    font-size: 13px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============== BUTTONS =============== */

.button {
    display: inline-block;
    padding: 12px 22px;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--ink);
    box-shadow: var(--shadow-sm);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button.outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.button.outline:hover {
    background: var(--panel);
    color: var(--ink);
}

/* =============== HERO =============== */

.hero {
    position: relative;
    padding: 110px 0 70px;
    overflow: hidden;
    background-color: var(--paper);
    background-image:
        radial-gradient(circle, var(--line) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: -14px -14px;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(31, 111, 92, 0.16), transparent 70%);
    top: -160px;
    right: -120px;
}

.hero::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(180, 87, 30, 0.10), transparent 70%);
    bottom: -140px;
    left: -100px;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: start;
}

.hero-text {
    max-width: 780px;
}

/* --- profile card: a "spec sheet" ID card standing in for a headshot --- */

.profile-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    padding: 26px;
    margin-top: 8px;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    overflow: hidden;
}

.profile-photo img,
.profile-photo svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.profile-card-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.profile-card-row:first-of-type {
    border-top: none;
}

.profile-card-row span:first-child {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.profile-card-row span:last-child {
    font-weight: 600;
}

.eyebrow {
    margin-bottom: 22px;
    display: inline-block;
}

h1 {
    font-family: var(--font-display);
    font-size: 58px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
}

.hero p {
    max-width: 620px;
    color: var(--ink-soft);
    font-size: 18px;
}

.buttons {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* --- readout strip: the signature element --- */
/* a horizontal instrument-scale bar of quick facts, styled like
   a measurement readout rather than a generic stats row */

.readout {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        repeating-linear-gradient(
            to right,
            var(--line) 0,
            var(--line) 1px,
            transparent 1px,
            transparent 33.333%
        );
}

.readout-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.readout-item {
    padding: 22px 28px;
}

.readout-item .tag {
    display: block;
    margin-bottom: 6px;
}

.readout-item strong {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
}

/* =============== SECTIONS =============== */

section {
    padding: 90px 0;
}

.light {
    background: var(--panel);
}

h2 {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 22px;
}

.section-head {
    max-width: 700px;
    margin-bottom: 50px;
}

.large-text {
    font-size: 19px;
    max-width: 740px;
    margin-bottom: 18px;
    color: var(--ink-soft);
}

#about p {
    max-width: 760px;
    color: var(--ink-soft);
}

#about p + p {
    margin-top: 14px;
}

/* =============== SERVICES =============== */

.service-lead {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.card {
    background: var(--paper);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.card-lead {
    background: var(--ink);
    color: var(--ink-invert);
    padding: 34px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-lead .tag {
    color: #8fd6c1;
}

.card-lead h3 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    margin: 12px 0 14px;
}

.card-lead p {
    color: #c7cdd1;
    font-size: 15px;
}

.card-lead-note {
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #8b969d;
    letter-spacing: 0.04em;
}

.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    color: var(--muted);
    font-size: 15px;
}

/* =============== PORTFOLIO — spec-sheet cards =============== */

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.project {
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: var(--paper);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    position: relative;
    height: 190px;
    overflow: hidden;
}

.project-header img,
.project-header svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.3s ease;
}

.project:hover .project-header img,
.project:hover .project-header svg {
    transform: scale(1.04);
}

.project-header span {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(20, 24, 28, 0.78);
    color: var(--ink-invert);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    border-radius: 2px;
}

.project-body {
    padding: 28px;
}

.project-body h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 14px;
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    padding: 14px 0;
    margin-bottom: 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.meta-grid div {
    font-size: 13px;
}

.meta-grid span {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.project-body > p {
    color: var(--ink-soft);
    margin-bottom: 18px;
    font-size: 15px;
}

.text-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.text-link:hover {
    text-decoration: underline;
}

/* =============== PROCESS =============== */

.process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.process-step {
    padding-top: 18px;
    border-top: 2px solid var(--accent);
}

.process strong {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.06em;
}

.process h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin: 10px 0 8px;
}

.process p {
    color: var(--muted);
    font-size: 14px;
}

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

.contact {
    background: var(--ink);
    color: var(--ink-invert);
}

.contact .tag {
    color: #8fd6c1;
}

.contact h2 {
    color: var(--ink-invert);
}

.contact > .container > p {
    color: #c7cdd1;
    max-width: 520px;
}

.contact-links {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.contact .button.outline {
    color: var(--ink-invert);
    border-color: #3a4349;
}

.contact .button.outline:hover {
    background: #1e2529;
}

.contact-details {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #2c3438;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 13px;
    color: #9aa4aa;
}

.contact-details span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6e777d;
    margin-bottom: 4px;
}

/* =============== FOOTER =============== */

footer {
    padding: 26px 5%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-family: var(--font-mono);
}

/* =============== MOBILE =============== */

@media(max-width: 800px) {

    h1 {
        font-size: 42px;
    }

    .hero-top {
        grid-template-columns: 1fr;
    }

    .profile-card {
        max-width: 320px;
    }

    .service-lead {
        grid-template-columns: 1fr;
    }

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

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

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

    .readout-inner {
        grid-template-columns: 1fr;
    }

    .readout {
        background: none;
        border-bottom: none;
    }

    .readout-item {
        border-bottom: 1px solid var(--line);
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 10px 5%;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links .button {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
}

@media(max-width: 500px) {

    h1 {
        font-size: 34px;
    }

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

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

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

    footer {
        flex-direction: column;
    }
}

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