/* ─────────────────────────────────────
   home.css  —  John Loughrin homepage
───────────────────────────────────── */

:root {
  --bg:        #0d0c0b;
  --text:      #ddd8d0;
  --text-soft: #8c8580;
  --text-dim:  #3d3a36;
  --text-label:#7a746e;
  --accent:    #e07a38;
  --rule:      #353230;
  --serif:     'Lora', Georgia, serif;
  --mono:      'DM Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  background-image: radial-gradient(
    ellipse 80% 50% at 30% 0%,
    rgba(224, 122, 56, 0.05) 0%,
    transparent 65%
  );
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

/* ── STATUS BAR ── */
.status-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: max(clamp(1.5rem, 3.5vw, 3rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.5rem, 3.5vw, 3rem), env(safe-area-inset-right));
  background: rgba(13, 12, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── TWO-COLUMN LAYOUT ── */
.layout {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: calc(100vh - 40px);
  margin-top: 40px;
}

/* ── LEFT: NAME ── */
.col-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem clamp(1.5rem, 3.5vw, 3.5rem);
  border-right: 1px solid transparent;
  position: sticky;
  top: 40px;
  height: calc(100vh - 40px);
  align-self: start;
}

.name-inner { max-width: 440px; }

h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 3.8vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
  min-height: 1.1em;
}

.caret {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  margin-left: 1px;
  animation: blink 1.05s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.tagline {
  font-size: clamp(0.62rem, 0.9vw, 0.78rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0;
  animation: fadeIn 0.7s ease 1.9s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ── TAGLINE WEATHER TRIGGER ── */
.tagline-weather-btn {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-soft);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0.35rem 0.15rem;
  margin: -0.35rem -0.15rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.tagline-weather-btn:hover,
.tagline-weather-btn[aria-expanded="true"] {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.tagline-weather-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── WEATHER WIDGET ── */
.weather-widget {
  display: none;
  margin-top: 1.75rem;
}

.weather-widget[hidden] {
  display: none !important;
}

.weather-widget.weather-widget--open {
  display: block;
  animation: fadeUp 0.35s ease;
}

.weather-widget--open {
  max-height: none;
  overflow: visible;
}

.weather-widget--open.weather-widget--has-chart {
  max-height: min(88vh, 860px);
}

.wx-panel {
  background: #111009;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.1rem 1.15rem 1.25rem;
}

.wx-location-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wx-location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wx-action-btn,
.wx-detect {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.wx-action-btn:hover,
.wx-detect:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wx-action-btn:disabled,
.wx-detect:disabled {
  opacity: 0.5;
  cursor: wait;
}

.wx-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: end;
}

.wx-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wx-location-input {
  grid-column: 1 / -1;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.55rem 0.65rem;
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.wx-location-input::placeholder {
  color: var(--text-dim);
  opacity: 1;
}

.wx-location-input:focus {
  outline: none;
  border-color: var(--accent);
}

.wx-go {
  background: var(--accent);
  border: none;
  color: #0d0c0b;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.wx-go:hover { filter: brightness(0.92); }

.wx-go:disabled,
.wx-location-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wx-status {
  min-height: 1.2em;
  margin-top: 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.wx-status--error { color: #f07070; }

.wx-results {
  margin-top: 1rem;
  animation: fadeUp 0.35s ease;
}

.wx-results--hidden {
  display: none;
}

.wx-results-layout--with-chart {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.65rem;
}

.wx-results-main {
  flex: 1 1 auto;
  min-width: 0;
}

.wx-city-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.wx-city-name .wx-state {
  color: var(--text-soft);
  font-size: 0.72em;
  font-weight: 600;
}

.wx-crazy-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin: -0.15rem 0 0.55rem;
  line-height: 1.35;
}

.wx-crazy-callout[hidden] {
  display: none;
}

.wx-crazy-callout-headline {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.wx-crazy-callout-detail {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.wx-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.wx-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.wx-temp-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wx-temp {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  margin: 0;
}

.wx-temp-unit {
  font-family: var(--mono);
  font-size: 0.45em;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-left: 0.15em;
}

.wx-temp-feels {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  line-height: 1.35;
}

.wx-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0;
}

.wx-metric {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.wx-metric:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wx-metric--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d0c0b;
}

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

.wx-chart-wrap {
  flex: 0 0 38%;
  max-width: 9.5rem;
  min-width: 6.25rem;
  margin-top: 0;
  padding: 0 0 0 0.65rem;
  border-top: none;
  border-left: 1px solid var(--rule);
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wx-chart-wrap[hidden] {
  display: none;
}

.wx-chart-wrap--sky {
  max-width: 9.5rem;
  min-height: 6.35rem;
}

.wx-chart-wrap--sky .wx-chart-label,
.wx-chart-wrap--sky .wx-chart {
  display: none !important;
  height: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  visibility: hidden;
}

.wx-chart-wrap--sky .wx-detail {
  width: 100%;
  height: 6.35rem;
  min-height: 6.35rem;
  max-height: 6.35rem;
  overflow: hidden;
}

.wx-chart-label {
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.wx-chart {
  width: 100%;
  height: 5.25rem;
  max-height: 5.25rem;
  display: block;
  overflow: visible;
}

.wx-chart-grid {
  stroke: var(--rule);
  stroke-width: 1;
}

.wx-chart-segment {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wx-detail {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text);
  line-height: 1.55;
}

.wx-detail[hidden],
.wx-chart[hidden],
.wx-chart-label[hidden] {
  display: none !important;
}

.wx-detail-row {
  margin: 0 0 0.45rem;
}

.wx-detail-row:last-child {
  margin-bottom: 0;
}

.wx-detail-label {
  color: var(--text-label);
  text-transform: uppercase;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
}

.wx-detail-value {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
  margin-top: 0.15rem;
}

.wx-detail-moon {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 0.2rem;
}

.wx-sky-card {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 6.35rem;
  max-height: 6.35rem;
  overflow: hidden;
  gap: 0.4rem;
}

.wx-sky-icon {
  flex-shrink: 0;
}

.wx-sky-icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wx-sky-category {
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.wx-sky-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.wx-sky-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.wx-sky-desc {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--text-soft);
  margin: 0;
}

.wx-sky-meta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-label);
  margin: 0;
}

.wx-sky-times {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  min-width: 0;
}

.wx-sky-time {
  margin: 0;
  text-align: center;
}

.wx-sky-time-value {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.15rem;
  letter-spacing: -0.02em;
}

/* Sun + moon: shared icon size and top alignment */
.wx-sky-card--sun,
.wx-sky-card--moon {
  /* Matches sunrise/sunset label row + gap before time values */
  --wx-sky-value-offset: calc(0.55rem * 1.2 + 0.15rem);
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding-top: 0;
  gap: 0;
}

.wx-sky-card--sun .wx-sky-icon,
.wx-sky-card--moon .wx-sky-icon {
  width: 2.85rem;
  height: 2.85rem;
  margin: 0 auto 0.28rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sun rays read smaller than the moon disk at the same box size */
.wx-sky-card--sun .wx-sky-icon-svg--sun {
  transform: scale(1.12);
  transform-origin: center;
}

.wx-sky-card--sun .wx-sky-times {
  width: 100%;
  flex: 0 0 auto;
  padding-bottom: 0.1rem;
}

.wx-sky-card--sun .wx-sky-time-value {
  font-size: 1.05rem;
  line-height: 1.1;
}

.wx-sky-card--sun .wx-detail-label {
  line-height: 1.2;
}

.wx-sky-card--moon .wx-sky-body {
  width: 100%;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0;
  padding-top: var(--wx-sky-value-offset);
}

.wx-sky-card--moon .wx-sky-title {
  font-size: 1.05rem;
  line-height: 1.1;
  margin: 0;
}

.wx-sky-card--moon .wx-sky-meta {
  font-size: 0.55rem;
  line-height: 1.2;
}

.wx-chart-axis {
  fill: var(--text-dim);
  font-family: var(--mono);
  font-size: 8px;
}

/* ── RIGHT: WORK ── */
.col-work {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem 4rem clamp(1.5rem, 3vw, 3rem);
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 0.57rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.9s forwards;
}

/* ── WORK LIST ── */
.work-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

.work-item {
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}

.work-item:nth-child(1) { animation-delay: 1.05s; }
.work-item:nth-child(2) { animation-delay: 1.15s; }
.work-item:nth-child(3) { animation-delay: 1.25s; }
.work-item:nth-child(4) { animation-delay: 1.35s; }
.work-item:nth-child(5) { animation-delay: 1.45s; }
.work-item:nth-child(6) { animation-delay: 1.55s; }

.work-item a {
  display: block;
  padding: 1.3rem 0;
}

.work-row {
  display: flex;
  align-items: baseline;
  gap: clamp(0.65rem, 1.4vw, 1.2rem);
}

.wn {
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  width: 1.75rem;
  flex-shrink: 0;
}

.wt {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  flex: 1;
  transition: color 0.2s ease;
}

.work-item a:hover .wt { color: var(--accent); }

/* Per-item hover accent colors */
.work-item:nth-child(2) a:hover .wt { color: #a78bfa; }
.work-item:nth-child(3) a:hover .wt { color: #f0407a; }
.work-item:nth-child(4) a:hover .wt { color: #4ade80; }
.work-item:nth-child(5) a:hover .wt { color: #facc15; }
.work-item:nth-child(6) a:hover .wt { color: #22d3ee; }

.wk {
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: auto;
}

.wa {
  font-size: 0.88rem;
  color: var(--text-dim);
  flex-shrink: 0;
  width: 1.25rem;
  text-align: right;
  transition: transform 0.22s ease, color 0.22s ease;
}

.work-item a:hover .wa {
  transform: translateX(4px);
  color: var(--accent);
}

.work-item:nth-child(2) a:hover .wa { color: #a78bfa; }
.work-item:nth-child(3) a:hover .wa { color: #f0407a; }
.work-item:nth-child(4) a:hover .wa { color: #4ade80; }
.work-item:nth-child(5) a:hover .wa { color: #facc15; }
.work-item:nth-child(6) a:hover .wa { color: #22d3ee; }

/* Description — hidden by default, reveals on hover */
.wd {
  font-size: 0.76rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-left: calc(1.75rem + clamp(0.65rem, 1.4vw, 1.2rem));
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity    0.25s ease,
    margin-top 0.25s ease;
}

.work-item a:hover .wd {
  max-height: 4rem;
  opacity: 1;
  margin-top: 0.5rem;
}

/* ── FOOTER ── */
footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1.25rem clamp(1.5rem, 3.5vw, 3rem);
  border-top: 1px solid transparent;
  font-size: 0.57rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .work-item,
  .section-label,
  .tagline { opacity: 1 !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
    min-height: auto;
    overflow-x: clip;
  }

  .col-name {
    position: static;
    height: auto;
    min-height: min(52vh, 22rem);
    border-right: none;
    border-bottom: 1px solid transparent;
    padding: 3.5rem max(1.25rem, env(safe-area-inset-right))
             2rem max(1.25rem, env(safe-area-inset-left));
    justify-content: flex-end;
  }

  .col-name:has(.weather-widget--open) {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 2.75rem;
    padding-bottom: 2.25rem;
  }

  .name-inner {
    max-width: none;
    width: 100%;
  }

  .weather-widget {
    margin-top: 1.25rem;
    width: 100%;
  }

  .weather-widget.weather-widget--open,
  .weather-widget--open.weather-widget--has-chart {
    display: block;
    max-height: none;
    overflow: visible;
  }

  .wx-panel {
    padding: 1rem 1rem 1.15rem;
  }

  .wx-location-actions {
    width: 100%;
  }

  .wx-action-btn,
  .wx-detect {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: min(100%, 10rem);
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    text-align: center;
  }

  .wx-search {
    grid-template-columns: 1fr auto;
    align-items: stretch;
  }

  .wx-location-input {
    grid-column: 1;
    grid-row: 1;
    min-height: 2.75rem;
    font-size: 16px;
    padding: 0.65rem 0.75rem;
  }

  .wx-go {
    grid-column: 2;
    grid-row: 1;
    min-height: 2.75rem;
    min-width: 3.25rem;
    padding: 0 1.1rem;
    align-self: stretch;
  }

  .wx-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
  }

  .wx-metric {
    min-height: 2.75rem;
    padding: 0.55rem 0.4rem;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .wx-main {
    gap: 0.85rem;
  }

  .wx-icon {
    width: 64px;
    height: 64px;
  }

  .wx-results-layout--with-chart {
    flex-direction: column;
    gap: 0;
  }

  .wx-chart-wrap {
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 0.85rem 0 0.15rem;
    margin-top: 0.15rem;
    border-left: none;
    border-top: 1px solid var(--rule);
  }

  .wx-chart-wrap--sky {
    max-width: none;
    min-height: 6.75rem;
    padding-top: 0.75rem;
  }

  .wx-chart-wrap--sky .wx-detail,
  .wx-sky-card {
    height: 6.75rem;
    min-height: 6.75rem;
    max-height: 6.75rem;
  }

  .wx-chart {
    height: 6.75rem;
    max-height: none;
  }

  h1 { font-size: clamp(2.8rem, 8vw, 5rem); }

  .col-work {
    justify-content: flex-start;
    padding: 1.5rem max(1.25rem, env(safe-area-inset-right))
             max(2.5rem, env(safe-area-inset-bottom))
             max(1.25rem, env(safe-area-inset-left));
  }

  /* Mobile: project title + tagline only — no hover reveal */
  .wn,
  .wk,
  .wa { display: none; }

  .work-row {
    gap: 0;
    flex-wrap: wrap;
  }

  .wt {
    flex: 1 1 100%;
    font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  }

  .wd {
    flex: 1 1 100%;
    margin-left: 0;
    max-height: none;
    overflow: visible;
    opacity: 1;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    line-height: 1.55;
  }

  .work-item a {
    padding: 1.1rem 0;
  }

  .work-item a:hover .wt,
  .work-item a:hover .wa { color: var(--text); }

  .work-item:nth-child(n) a:hover .wt,
  .work-item:nth-child(n) a:hover .wa { color: var(--text); }
}

/* Touch devices: same title + tagline layout above 820px (e.g. tablet) */
@media (hover: none) and (min-width: 821px) {
  .wn,
  .wk,
  .wa { display: none; }

  .work-row {
    gap: 0;
    flex-wrap: wrap;
  }

  .wt { flex: 1 1 100%; }

  .wd {
    margin-left: 0;
    max-height: none;
    overflow: visible;
    opacity: 1;
    margin-top: 0.35rem;
  }

  .work-item a:hover .wt,
  .work-item:nth-child(n) a:hover .wt { color: var(--text); }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(2.2rem, 9vw, 3.5rem); }

  .col-name {
    min-height: min(48vh, 18rem);
    padding-top: 3rem;
  }

  .col-name:has(.weather-widget--open) {
    padding-top: 2.25rem;
  }

  .wx-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .wx-metric--sun,
  .wx-metric--moon {
    grid-column: span 1;
  }

  .wx-city-name {
    font-size: 1.15rem;
  }

  .wx-temp {
    font-size: clamp(1.65rem, 7vw, 2rem);
  }

  .wx-chart {
    height: 6.25rem;
  }

  footer {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }
}

/* Coarse pointers: stronger tap feedback (phones / tablets) */
@media (hover: none) {
  .wx-metric:active {
    background: rgba(224, 122, 56, 0.2);
    border-color: var(--accent);
    color: var(--accent);
  }

  .wx-metric--active:active {
    background: var(--accent);
    color: #0d0c0b;
  }

  .wx-action-btn:active,
  .wx-detect:active,
  .wx-go:active,
  .tagline-weather-btn:active {
    opacity: 0.85;
  }
}
