/* ============================================================
   ORANGEWORKER — Mid-Century Modern Design System
   ============================================================ */

@font-face {
    font-family: 'Clarendon';
    src: url('/Clarendon.woff') format('woff');
}

:root {
    --orange:      #ff5f00;
    --orange-dk:   #cc4c00;
    --cream:       #f4edd8;
    --cream-dk:    #e8dfc4;
    --charcoal:    #1c1812;
    --mustard:     #d4961a;
    --mustard-dk:  #a17113;
    --teal:        #2d7873;
    --teal-dk:     #1b4b48;
    --white:       #ffffff;
    --slate:       #45413d;
    --brown:       #6b4423;
    --sage:        #8a9060;


    /* Defaults: sans-serif for body; heading font set separately */
    --ff-body:   Arial, Helvetica, sans-serif;
    --ff-heading: 'Clarendon', Georgia, 'Times New Roman', serif;

    --sp-xs: 0.5rem;
    --sp-sm: 1rem;
    --sp-md: 2rem;
    --sp-lg: 3rem;
    --sp-xl: 5rem;
}

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

/* ----- Base ----- */
body {
    background-color: var(--cream);
    color: var(--charcoal);
    font-family: var(--ff-body);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* headings use Clarendon */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--ff-heading);
}

a { color: inherit; }

/* ============================================================
   SHARED: Multi-color stripe band (MCM, SVG only)
   3 colors: sage #8a9060 · orange #d4631a · brown #6b4423
   Shape: flat → step → flat (elbow)

   links  → angular step UP   (sharp diagonal, right side higher)
   work   → angular step DOWN (sharp diagonal, right side lower)
   photes → smooth step DOWN  (cubic bezier, right side lower)
   haiku  → smooth step UP    (cubic bezier, right side higher)

   ViewBox: 0 0 1200 94
   3 stripes × 16px, 4px gaps, 4px top/bottom margin at nearest stripe
   Step amplitude 30px — nearest stripe top is always y=4 (4px from header edge)
   Transition: x 240→480 (1/5 width), flat sections 1/5 and 3/5
   ============================================================ */

.stripe-band {
    display: block;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    background-color: var(--orange);
}

.stripe-band svg {
    display: block;
    width: 100%;
    height: 120px;
}

/* ============================================================
   HOMEPAGE  (index.html)
   ============================================================ */

.home-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100dvh;
}

/* ---- Brand panel (left / top-on-mobile) ---- */
.brand-panel {
    background-color: var(--orange);
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Large ghost ring — bottom-right corner */
.brand-panel::before {
    content: '';
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    border: 56px solid rgba(255,255,255,.09);
    bottom: -190px;
    right: -190px;
    pointer-events: none;
}

/* Smaller ghost ring — upper area */
.brand-panel::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 28px solid rgba(255,255,255,.10);
    top: var(--sp-lg);
    right: var(--sp-lg);
    pointer-events: none;
}

.brand-label {
    font-family: var(--ff-heading);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    position: relative;
    z-index: 1;
}

.brand-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 
        inset 0 0 0 10px white, 
        inset 0 0 0 15px #ff5f00, 
        inset 0 0 0 25px white;
}
.brand-wordmark {
    font-family: var(--ff-heading);
    font-size: clamp(3rem, 6.5vw, 7rem);
    line-height: 0.85;
    letter-spacing: -0.02em;
    color: var(--white);
    position: relative;
    z-index: 1;
}

/* ---- Content panel (right / bottom-on-mobile) ---- */
.content-panel {
    background-color: var(--cream);
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--sp-md);
}


/* ============================================================
   Navigation
   ============================================================ */

.site-nav {
    display: flex;
    gap: var(--sp-md);
    align-items: center;
    flex-wrap: wrap;
}

/* Contain the extending rules without creating a scroll context */
.site-navbar {
    overflow-x: clip;
}
#navbarNav {
    position: relative;
    top: 30px;;
}

.navbar-nav {
    list-style: none;
    padding: 0;
    margin: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.navbar-nav li {
    position: relative;
}

/* Staircase indent — each item nests one step deeper */
.navbar-nav li:nth-child(2) { margin-left: 2.25em; }
.navbar-nav li:nth-child(3) { margin-left: 4.5em; }
.navbar-nav li:nth-child(4) { margin-left: 6.75em; }
.navbar-nav li:nth-child(5) { margin-left: 9em; }

.navbar-nav li:nth-child(2):before, 
.navbar-nav li:nth-child(2) .nav-link:before,
.navbar-nav li:nth-child(2) .nav-link:after {
    background-color: var(--teal); 
}

.navbar-nav li:nth-child(3):before, 
.navbar-nav li:nth-child(3) .nav-link:before,
.navbar-nav li:nth-child(3) .nav-link:after {
    background-color: var(--orange-dk); 
}
.navbar-nav li:nth-child(4):before, 
.navbar-nav li:nth-child(4) .nav-link:before,
.navbar-nav li:nth-child(4) .nav-link:after {
    background-color: var(--sage); 
}
.navbar-nav li:nth-child(5):before, 
.navbar-nav li:nth-child(5) .nav-link:before,
.navbar-nav li:nth-child(5) .nav-link:after {
    background-color: var(--teal-dk); 
}


/* top rule — extends to the left edge */
.nav-link::after {
    content: '';
    position: absolute;
    left: 100%;
    width: 100vw;
    height: 4px;
    background-color: var(--mustard);
    z-index: 0;
    transform-origin: top left;
    transform: rotate(45deg) skewX(-45deg) translateX(-.12em) translateY(.5em);
}
/* Bottom rule — extends to the left edge */
.nav-link::before {
    content: '';
    position: absolute;
    left: 0%;
    width: 20em;
    height: 4px;
    background-color: var(--mustard);
    z-index: 0;
    transform-origin: top left;
    transform: rotate(45deg) skewX(-45deg) translateX(-17.8em) translateY(.3em);
}

.nav-item {
    display: block;
    position: relative;
    z-index: 1;
    width:8em;
    padding: 0.1em .5em 0.1em 1em;
    transform:rotate(-45deg);
    margin-top: -1.75em;
    text-align: right;
}

.nav-link {
    font-family: var(--ff-body);
    font-size: 1rem;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: color 0.2s ease;
}

/* Skewed parallelogram background — text stays upright */
.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--mustard);
    transform: skewX(45deg);
    z-index: -1;
}

.nav-link:hover {
    color: var(--charcoal);
}

#theme-toggle {
    position: relative;
    top: 30px;
    left: 10px;
}

/* Hero */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-md);
}

.tagline {
    font-family: var(--ff-body);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    line-height: 1.05;
    color: var(--charcoal);
    max-width: 16ch;
}

.accent-row {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.accent-line {
    height: 4px;
    width: 64px;
    background-color: var(--teal);
    flex-shrink: 0;
}

.accent-label {
    font-family: var(--ff-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal);
}

/* Footer */
.site-footer {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--charcoal);
    opacity: 0.4;
}

/* ============================================================
   SHARED: PAGE HEADER  (links, work, photes, haiku)
   ============================================================ */

/* helper class to allow themes to float/navbar to one side of content
   use `.site-navbar.left` or `.site-navbar.right` in a stylesheet and
   the layout will adjust accordingly. themes can also overwrite this
   entirely if they want different positioning logic. */
.site-navbar.left { order: -1; }
.site-navbar.right { order: 1; }

/* subtitle under the brand name */
.page-subhead {
    display: block;
    font-size: 1.75rem;
    color: var(--charcoal);
    opacity: 0.6;
    line-height: 1;
    margin: 0;
    text-transform:uppercase;
}

.page-header {
    background-color: var(--orange);
    padding: var(--sp-sm) var(--sp-sm);
    display: flex;
    gap: var(--sp-sm);
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.heading-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Ghost ring — top-right */
.page-header::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 36px solid rgba(255,255,255,.10);
    top: -100px;
    right: -60px;
    pointer-events: none;
}

.page-wordmark {
    font-family: var(--ff-heading);
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 0.85;
    letter-spacing: -0.02em;
    color: var(--white);
    position: relative;
    z-index: 1;
    margin: 0;
}

.page-wordmark a {
    text-decoration: none;
    color: inherit;
}

.back-link {
    font-family: var(--ff-body);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255,255,255,.70);
    border-bottom: 2px solid rgba(255,255,255,.35);
    padding-bottom: 2px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: color .15s ease, border-color .15s ease;
}

.back-link:hover {
    color: var(--white);
    border-color: var(--white);
}

/* ============================================================
   SHARED: PAGE BODY
   ============================================================ */

.container {
    max-width: 760px;
    margin: 0 auto 0 14em;
    padding: var(--sp-sm) var(--sp-sm);
    flex: 1;
}

.page-intro {
    font-family: var(--ff-body);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.1;
    color: var(--charcoal);
    margin-bottom: var(--sp-xl);
}

/* ============================================================
   WORK PAGE
   ============================================================ */

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--sp-md);
}

.work-card {
    background-color: var(--cream-dk);
    border-top: 5px solid var(--orange);
    padding: var(--sp-md);
}

.work-card-title {
    font-family: var(--ff-body);
    font-size: 1.4rem;
    line-height: 1.1;
    margin-bottom: var(--sp-xs);
}

.work-card-meta {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: var(--sp-sm);
}

.work-card-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.75;
}

/* ============================================================
   PHOTES PAGE
   ============================================================ */

.photo-albums {
    display: flex;
    flex-direction: column;
}

.photo-album {
    border-bottom: 1px solid var(--cream-dk);
}

.photo-album-row {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) 0;
    cursor: pointer;
    list-style: none;
}

.photo-album-row::-webkit-details-marker { display: none; }
.photo-album-row::marker { content: none; }

.photo-album[open] > .photo-album-row .visit-expand-icon {
    transform: rotate(90deg);
}

.photo-album-name {
    flex: 1;
    font-family: var(--ff-heading);
    font-size: 1.1rem;
    color: var(--charcoal);
}

.photo-album-count {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--teal);
    opacity: 0.7;
}

.photo-album-body {
    padding-bottom: var(--sp-md);
}

.photo-featured-wrap {
    margin-bottom: var(--sp-sm);
    background-color: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 480px;
    overflow: hidden;
}

.photo-featured {
    display: block;
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
}

.photo-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.photo-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.75;
    transition: opacity 0.1s ease, border-color 0.1s ease;
}

.photo-thumb:hover {
    opacity: 1;
    border-color: var(--orange);
}

.photo-thumb--active {
    opacity: 1;
    border-color: var(--orange);
}

/* ============================================================
   HAIKU PAGE
   ============================================================ */

article {
    margin: var(--sp-sm) 0;
}

cite {
    display: block;
    font-family: var(--ff-body);
    font-size: 0.9rem;
    color: var(--teal);
    opacity: 0.8;
    margin-top: var(--sp-xs);
    text-align: right;
}

/* ============================================================
   VISITS PAGE
   ============================================================ */

.visits-list {
    display: flex;
    flex-direction: column;
}

.visit-country {
    border-bottom: 1px solid var(--cream-dk);
}

.visit-country-row {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) 0;
    cursor: pointer;
    list-style: none;
}

.visit-country-row::-webkit-details-marker { display: none; }
.visit-country-row::marker { content: none; }

.visit-expand-icon {
    font-size: 0.55rem;
    color: var(--orange);
    transition: transform 0.15s ease;
    flex-shrink: 0;
    display: inline-block;
}

.visit-country[open] > .visit-country-row .visit-expand-icon {
    transform: rotate(90deg);
}

.visit-country-name {
    flex: 1;
    font-family: var(--ff-heading);
    font-size: 1.1rem;
    color: var(--charcoal);
}

.visit-country-code {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal);
}

.visit-count {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    color: var(--orange);
    font-weight: bold;
    min-width: 4ch;
    text-align: right;
}

.visit-regions {
    margin: 0 0 var(--sp-sm) 1.4rem;
    padding-left: var(--sp-md);
    border-left: 3px solid var(--orange);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.visit-region-row {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    font-size: 0.9rem;
    color: var(--charcoal);
    opacity: 0.75;
}

.visit-region-name {
    flex: 1;
}

/* ============================================================
   VISIT COUNTER
   ============================================================ */

.site-counter-footer {
    text-align: center;
    padding: var(--sp-md);
    background-color: var(--charcoal);
}

.visit-counter {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
}

.counter-label {
    font-family: var(--ff-body);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
}

.counter-display {
    display: flex;
    gap: 2px;
    background-color: #0a0a0a;
    border: 2px inset rgba(0,0,0,0.6);
    padding: 3px 5px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.05);
}

.counter-sep {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--orange-dk);
    line-height: 1;
    opacity: 0.6;
}


.counter-digit {
    display: inline-block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--orange);
    width: 1ch;
    text-align: center;
    text-shadow: 0 0 8px var(--orange), 0 0 2px var(--orange-dk);
    line-height: 1;
}

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

@media (max-width: 768px) {
    .home-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .brand-panel {
        min-height: 42vh;
        padding: var(--sp-md);
    }

    .brand-panel::before {
        width: 300px;
        height: 300px;
        border-width: 38px;
        bottom: -120px;
        right: -100px;
    }

    .brand-panel::after {
        width: 100px;
        height: 100px;
        border-width: 18px;
        top: var(--sp-md);
        right: var(--sp-md);
    }

    .brand-wordmark {
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .content-panel {
        padding: var(--sp-md);
    }

    .page-header {
        padding: var(--sp-sm) var(--sp-md);
        flex-wrap: wrap;
    }

    .container {
        padding: var(--sp-lg) var(--sp-md);
    }

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

@media (max-width: 420px) {
    .brand-wordmark {
        font-size: clamp(2.5rem, 13vw, 4rem);
    }
}
