/*
Theme Name: cosper-me
Author: Jason Cosper
Description: A personal site theme inspired by Swiss Design. Bold typography, editorial chrome, and structured grids.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: cosper-me
Tags: block-theme, full-site-editing, portfolio, personal

cosper-me — Swiss Design theme
*/

/* Corner crop marks */
.cm-wrap {
  position: relative;
  padding: 2.5rem;
  box-sizing: border-box;
}

.cm-wrap::before,
.cm-wrap::after {
  content: "";
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  pointer-events: none;
}

.cm-wrap::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--wp--preset--color--ink);
  border-left: 1px solid var(--wp--preset--color--ink);
}

.cm-wrap::after {
  top: 0;
  right: 0;
  border-top: 1px solid var(--wp--preset--color--ink);
  border-right: 1px solid var(--wp--preset--color--ink);
}

.cm-corners-bottom {
  position: relative;
}

.cm-corners-bottom::before,
.cm-corners-bottom::after {
  content: "";
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  pointer-events: none;
  bottom: 0;
}

.cm-corners-bottom::before {
  left: 0;
  border-bottom: 1px solid var(--wp--preset--color--ink);
  border-left: 1px solid var(--wp--preset--color--ink);
}

.cm-corners-bottom::after {
  right: 0;
  border-bottom: 1px solid var(--wp--preset--color--ink);
  border-right: 1px solid var(--wp--preset--color--ink);
}

/* Top chrome bar */
.top-chrome {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.top-chrome .wp-block-group {
  flex-grow: 1;
}

.chrome-hairline {
  flex-grow: 1;
  height: 1px;
  background-color: var(--wp--preset--color--ink);
  opacity: 0.15;
}

.chrome-bracket {
  font-size: 14px;
  line-height: 1;
}

/* Hero section */
.hero-block {
  display: grid;
  grid-template-columns: 32% 1fr;
  gap: 0;
  align-items: stretch;
}

.hero-image-container {
  position: relative;
  overflow: hidden;
  background-color: var(--wp--preset--color--blue);
  min-height: 420px;
}

.hero-image-container .wp-block-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.hero-image-container .wp-block-image figure,
.hero-image-container figure.wp-block-image {
  margin: 0;
  height: 100%;
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  mix-blend-mode: screen;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  padding-left: 4rem;
  padding-bottom: 0;
}

.hero-name {
  font-size: clamp(60px, 9.5vw, 140px) !important;
  font-weight: 800 !important;
  line-height: 0.85 !important;
  letter-spacing: -0.04em !important;
  text-align: right !important;
  margin: 0 !important;
}

.red-dot {
  color: var(--wp--preset--color--red);
}

/* Tagline under hero name */
.hero-tagline {
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
  margin-top: 1.5rem !important;
  text-align: right !important;
}

/* Meta row */
.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 3px solid var(--wp--preset--color--ink);
  border-bottom: 1px solid var(--wp--preset--color--ink);
  padding: 0.75rem 0;
}

.meta-row p {
  font-size: 10px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 !important;
}

/* Body zone */
.body-zone {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 6rem;
}

/* Section headers */
.sec-head {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--wp--preset--color--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sec-head p {
  font-size: 10px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 !important;
}

/* Bio text */
.bio-text {
  font-size: 1.35rem !important;
  line-height: 1.45 !important;
  max-width: 95%;
}

/* Elsewhere list */
.elsewhere-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.elsewhere-item {
  display: grid;
  grid-template-columns: 90px 1fr 30px;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px dotted rgba(10, 10, 10, 0.2);
}

.elsewhere-item:first-child {
  border-top: 1px dotted rgba(10, 10, 10, 0.2);
}

.elsewhere-label {
  font-size: 10px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

.elsewhere-link {
  font-size: 1.15rem !important;
}

.elsewhere-link a {
  color: var(--wp--preset--color--blue) !important;
  text-decoration: none !important;
  font-weight: 700;
  transition: color 0.2s ease;
}

.elsewhere-link a:hover {
  color: var(--wp--preset--color--red) !important;
}

.elsewhere-num {
  font-size: 10px !important;
  color: var(--wp--preset--color--red) !important;
  text-align: right;
}

/* Contact sheet grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: frame-counter;
}

.frame-cell {
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(10, 10, 10, 0.15);
  position: relative;
}

.frame-cell::after {
  content: "0" counter(frame-counter);
  counter-increment: frame-counter;
  position: absolute;
  bottom: -1.5rem;
  right: 0;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 9px;
  color: var(--wp--preset--color--red);
}

.frame-cell::before {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--wp--preset--color--ink);
  opacity: 0.2;
}

/* Footer */
.cm-footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(10, 10, 10, 0.15);
  padding-top: 1rem;
}

.cm-footer p {
  font-size: 9px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
}

.cm-footer a {
  color: var(--wp--preset--color--blue) !important;
  text-decoration: none !important;
}

.cm-footer a:hover {
  color: var(--wp--preset--color--red) !important;
}

/* Equal cards layout */
.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.equal-cards .cta-bottom {
  margin-top: auto;
  justify-content: center;
}

.wp-site-blocks > footer {
  margin-block-start: 0;
}

/* ===========================
   POSTER LAYOUT (index.html)
   =========================== */
.hero-name-poster {
  font-size: clamp(60px, 9.5vw, 140px) !important;
  line-height: 0.85 !important;
  letter-spacing: -0.04em !important;
  margin-bottom: 0 !important;
}

.poster-left-col {
  background-color: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--white);
  padding: var(--wp--preset--spacing--40);
}

.poster-left-col .sec-head {
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.poster-left-col .bio-text {
  color: var(--wp--preset--color--white);
}

.poster-left-col .bio-text strong {
  color: var(--wp--preset--color--red);
}

.poster-left-col .elsewhere-item {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.poster-left-col .elsewhere-item:first-child {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.current-status p {
  white-space: nowrap;
}

.poster-left-col .elsewhere-label {
  color: rgba(255, 255, 255, 0.6);
}

.poster-left-col .elsewhere-link a {
  color: var(--wp--preset--color--blue-tint) !important;
}

.poster-left-col .elsewhere-link a:hover {
  color: var(--wp--preset--color--red) !important;
}

.poster-portrait {
  min-height: 380px;
  max-width: 100%;
}

/* Pinned items */
.pinned-list .pinned-item {
  border-bottom: 1px solid rgba(10, 10, 10, 0.15);
  padding-bottom: var(--wp--preset--spacing--20);
  margin-bottom: var(--wp--preset--spacing--20);
}

/* ===========================
   CONTACT SHEET LAYOUT
   =========================== */
.hero-name-cs {
  font-size: clamp(48px, 7vw, 96px) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.03em !important;
}

.cs-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.cs-frame-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-frame-img {
  margin: 0 !important;
  height: 100%;
}

.cs-frame-img figure {
  margin: 0;
  height: 100%;
}

.cs-frame-meta {
  margin-top: 0.5rem;
}

.cs-sec-head {
  border-bottom: 2px solid var(--wp--preset--color--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

.cs-elsewhere-list .cs-elsewhere-item {
  display: grid;
  grid-template-columns: 40px 80px 1fr 20px;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.15);
}

.cs-elsewhere-list .cs-elsewhere-item .cs-el-url a {
  color: var(--wp--preset--color--ink) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  font-weight: 400;
  font-family: var(--wp--preset--font-family--mono);
}

.cs-elsewhere-list .cs-elsewhere-item .cs-el-url a:hover {
  color: var(--wp--preset--color--red) !important;
}

.cs-status-bar {
  border-top: 4px solid var(--wp--preset--color--blue);
  padding-top: var(--wp--preset--spacing--20);
  margin-top: var(--wp--preset--spacing--30);
}

/* ===========================
   DOSSIER LAYOUT
   =========================== */
.dossier-layout {
  min-height: 100vh;
}

.dossier-layout > .wp-block-column.dossier-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.dossier-portrait img {
  width: 100%;
  display: block;
}

.dossier-portrait {
  margin: 0 !important;
}

.dossier-section-head {
  border-bottom: 2px solid var(--wp--preset--color--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

.registry-list .registry-row {
  display: grid;
  grid-template-columns: 30px 140px 1fr auto;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.15);
}

.registry-list .registry-row .reg-num {
  opacity: 0.5;
}

.registry-list .registry-row .reg-arrow {
  margin-left: auto;
}

/* ===========================
   SCOREBOARD LAYOUT
   =========================== */
.sb-portrait {
  max-width: 280px;
  min-height: 280px;
}

/* Scoreboard table rows */
.sb-header-row,
.sb-data-row,
.sb-total-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px 60px 60px;
  align-items: center;
  gap: 0;
}

.sb-header-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 0.5rem;
}

.sb-data-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 0;
}

.sb-total-row {
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.sb-col-stat {
  text-align: center;
}

.sb-stat-num {
  font-variant-numeric: tabular-nums;
}

/* Scoreboard elsewhere list */
.sb-elsewhere-list .sb-el-item {
  display: grid;
  grid-template-columns: 70px 1fr 30px;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.15);
}

.sb-el-url a {
  color: var(--wp--preset--color--ink) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  font-family: var(--wp--preset--font-family--mono);
}

.sb-el-url a:hover {
  color: var(--wp--preset--color--red) !important;
}

.sb-el-num {
  text-align: right;
}

/* Scoreboard pinned items */
.sb-pinned .sb-pinned-item {
  border-bottom: 1px dotted rgba(10, 10, 10, 0.3);
  padding: 0.75rem 0;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-image-container {
    min-height: 300px;
    aspect-ratio: 16 / 9;
  }

  .hero-image-container img {
    position: relative;
  }

  .hero-text-col {
    padding-left: 0;
    align-items: flex-start;
  }

  .hero-name {
    text-align: left !important;
  }

  .hero-tagline {
    text-align: left !important;
  }

  .body-zone {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .cm-wrap {
    padding: 1.5rem;
  }

  .top-chrome {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .elsewhere-item {
    grid-template-columns: 70px 1fr 25px;
  }

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

  .cs-elsewhere-list .cs-elsewhere-item {
    grid-template-columns: 35px 60px 1fr 20px;
  }

  .registry-list .registry-row {
    grid-template-columns: 25px 100px 1fr auto;
  }

  .sb-header-row,
  .sb-data-row,
  .sb-total-row {
    grid-template-columns: 60px 1fr 40px 40px 40px;
  }
}

/* Dossier responsive */
@media (max-width: 900px) {
  .dossier-layout {
    flex-direction: column !important;
  }

  .dossier-layout > .wp-block-column.dossier-sidebar {
    position: static;
    height: auto;
    flex-basis: auto !important;
  }

  .dossier-layout > .wp-block-column.dossier-main {
    flex-basis: auto !important;
  }
}

/* ===========================
   BLOGROLL LAYOUT
   =========================== */
.blogroll-hero-title {
  font-size: clamp(48px, 7vw, 96px) !important;
  font-weight: 800 !important;
  line-height: 0.9 !important;
  letter-spacing: -0.03em !important;
  margin-bottom: 0 !important;
}

.blogroll-stats {
  text-align: right;
}

.blogroll-stats .stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.blogroll-category-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: baseline;
  border-bottom: 2px solid var(--wp--preset--color--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
  gap: 1rem;
}

.blogroll-category-head p {
  margin: 0 !important;
}

.blogroll-entry {
  display: grid;
  grid-template-columns: 50px 180px 1fr 180px 30px;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.15);
}

.blogroll-entry p {
  margin: 0 !important;
}

.blogroll-entry .bl-name {
  font-weight: 700;
}

.blogroll-entry .bl-url a {
  color: var(--wp--preset--color--ink) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  font-family: var(--wp--preset--font-family--mono);
}

.blogroll-entry .bl-url a:hover {
  color: var(--wp--preset--color--red) !important;
}

.blogroll-entry .bl-note {
  opacity: 0.6;
}

.blogroll-entry .bl-arrow {
  text-align: right;
}

.blogroll-footer-note {
  padding-top: 0;
  margin-top: 0;
}

/* ===========================
   CONTACT LAYOUT
   =========================== */
.contact-hero-title {
  font-size: clamp(48px, 8vw, 110px) !important;
  font-weight: 800 !important;
  line-height: 0.9 !important;
  letter-spacing: -0.03em !important;
  margin-bottom: 0 !important;
}

.contact-form-area {
  max-width: 640px;
}

.contact-form-area .omniform,
.contact-form-area .wp-block-omniform-form {
  font-family: var(--wp--preset--font-family--body);
}

.contact-form-area input[type="text"],
.contact-form-area input[type="email"],
.contact-form-area textarea,
.contact-form-area select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--wp--preset--color--ink);
  border-radius: 0;
  padding: 0.75rem 0;
  font-family: var(--wp--preset--font-family--body);
  font-size: 1rem;
  color: var(--wp--preset--color--ink);
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-form-area input[type="text"]:focus,
.contact-form-area input[type="email"]:focus,
.contact-form-area textarea:focus {
  border-bottom-color: var(--wp--preset--color--blue);
}

.contact-form-area textarea {
  border: 1px solid rgba(10, 10, 10, 0.2);
  padding: 1rem;
  min-height: 160px;
  resize: vertical;
}

.contact-form-area fieldset {
  border: 1px solid rgba(10, 10, 10, 0.2);
  padding: 1rem 1.5rem;
  margin: 0;
}

.contact-form-area fieldset legend {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.5rem;
}

.contact-form-area label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-form-area button[type="submit"],
.contact-form-area .wp-block-button__link {
  background-color: var(--wp--preset--color--blue) !important;
  color: var(--wp--preset--color--white) !important;
  border: none;
  border-radius: 0;
  padding: 0.85rem 2rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-form-area button[type="submit"]:hover,
.contact-form-area .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--ink) !important;
}

.contact-field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

/* ===========================
   CV LAYOUT
   =========================== */
.cv-hero-title {
  font-size: clamp(48px, 7vw, 96px) !important;
  font-weight: 800 !important;
  line-height: 0.9 !important;
  letter-spacing: -0.03em !important;
  margin-bottom: 0 !important;
}

.cv-section-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: baseline;
  border-bottom: 2px solid var(--wp--preset--color--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
  gap: 1rem;
}

.cv-section-head p {
  margin: 0 !important;
}

.cv-entry {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.15);
  gap: 2rem;
}

.cv-entry p {
  margin: 0 !important;
}

.cv-entry .cv-dates {
  font-variant-numeric: tabular-nums;
}

.cv-entry .cv-num {
  text-align: right;
}

.cv-entry-details .cv-company {
  font-size: 1.25rem !important;
  font-weight: 700;
}

.cv-entry-details .cv-role {
  opacity: 0.6;
  margin-top: 0.15rem !important;
}

.cv-entry-details .cv-desc {
  margin-top: 0.5rem !important;
}

.cv-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.cv-tool-cell {
  border: 1px solid rgba(10, 10, 10, 0.15);
  padding: 1rem;
  margin-right: -1px;
  margin-bottom: -1px;
}

.cv-tool-cell p {
  margin: 0 !important;
}

.cv-tool-cell .cv-tool-name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cv-tool-cell .cv-tool-note {
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cv-footer-links a {
  text-decoration: none !important;
  font-weight: 700;
}

.cv-footer-links a:first-child,
.cv-footer-links a.cv-hire-link {
  color: var(--wp--preset--color--red) !important;
}

/* CV / Blogroll / Contact responsive */
@media (max-width: 900px) {
  .blogroll-entry {
    grid-template-columns: 40px 1fr 1fr 25px;
  }

  .blogroll-entry .bl-note {
    display: none;
  }

  .cv-entry {
    grid-template-columns: 1fr 30px;
    gap: 1rem;
  }

  .cv-entry .cv-dates {
    grid-column: 1 / -1;
    margin-bottom: -0.5rem;
  }

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

@media (max-width: 600px) {
  .blogroll-entry {
    grid-template-columns: 35px 1fr 25px;
  }

  .blogroll-entry .bl-name {
    display: none;
  }

  .cv-tools-grid {
    grid-template-columns: 1fr;
  }
}
