@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;1,400&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500&display=swap');

/* ── BRAND TOKENS (per BRANDING.md) ── */
:root {
  --brand: #212842;
  --brand-2: #2E3556;
  --milk: #F3F3F3;

  --font-display: 'Spectral', serif;
  --font-body: 'Satoshi', sans-serif;

  --fs-hero: 56px;
  --fs-display: 32px;
  --fs-body: 18px;
  --fs-label: 16px;

  --radius: 16px;
  --gap: 24px;
}

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

body {
  background: var(--brand);
  color: var(--milk);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
}

/* ── SITE SHELL — two columns: nav sidebar, content ── */
.site-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  align-items: start;
}

.site-shell > * {
  min-width: 0;
}

@media (max-width: 720px) {
  .site-shell {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 24px;
  }
}

/* ── SIDEBAR ── */
.site-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 24px;
  text-align: right;
}

.site-title a {
  color: var(--milk);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.site-nav a {
  color: var(--milk);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 20px;
  padding: 6px 0;
  opacity: 0.85;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 720px) {
  .site-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 16px;
  }

  .site-nav a {
    padding: 2px 0;
  }
}

/* ── CONTENT ── */
.site-content {
  background: var(--milk);
  color: var(--brand);
  border-radius: var(--radius);
  padding: 48px;
}

@media (max-width: 720px) {
  .site-content {
    padding: 32px 24px;
  }
}

.site-content h1,
.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-display);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.page-description {
  font-size: var(--fs-body);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--brand-2);
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.entry {
  display: block;
}

.entry-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 6px;
}

.entry-title a {
  color: var(--brand);
  text-decoration: none;
}

.entry-desc {
  color: var(--brand);
  opacity: 0.85;
}

.entry-date {
  font-size: var(--fs-label);
  opacity: 0.6;
  margin-top: 4px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--brand-2);
  margin: 32px 0;
}

/* ── LINKS / RICH TEXT ── */
a {
  color: var(--milk);
}

/* .site-content is a light box now — this catches any link not covered
   by a more specific component rule below. */
.site-content a {
  color: var(--brand);
}

.site-content a:not(.entry-title a):not(.portfolio-bar) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text > * + * {
  margin-top: 18px;
}

mark {
  background-color: var(--brand);
  color: var(--milk);
  padding: 1px 5px;
  border-radius: 5px;
}

code {
  font-family: var(--font-body);
  font-weight: 500;
  background: var(--brand-2);
  color: var(--milk);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── NAV LIST (links / services / portfolio hub) ── */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  color: var(--brand);
  text-decoration: none;
  padding: 8px 0;
}

.link-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-group + .link-group {
  margin-top: 32px;
}

.link-group-title {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 8px;
}

/* ── HUB BLOCK (portfolio hub page: CV vs Projects) ── */
.hub-block {
  padding: 32px;
  border: 1px solid var(--brand-2);
  border-radius: var(--radius);
}

.hub-block + .hub-block {
  margin-top: 40px;
}

@media (max-width: 720px) {
  .hub-block {
    padding: 24px;
  }
}

/* ── FAQ ── */
.faq-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-q {
  font-weight: 500;
  margin-bottom: 4px;
}

.faq-a {
  opacity: 0.85;
}

/* ── EQUIPMENT GRID ── */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.equipment-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--brand-2);
  display: block;
}

.equipment-item p {
  margin-top: 8px;
  font-size: var(--fs-label);
}

/* ── RATES / ADD-ONS ── */
.rate-item + .rate-item {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--brand-2);
}

.rate-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.rate-name {
  font-family: var(--font-display);
  font-size: 20px;
}

.rate-price {
  font-size: var(--fs-label);
  opacity: 0.6;
  white-space: nowrap;
}

.rate-sub {
  font-size: var(--fs-label);
  opacity: 0.6;
  margin-top: 4px;
}

.rate-desc {
  margin-top: 6px;
  opacity: 0.85;
}

.addons-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.addon-item {
  display: flex;
  justify-content: space-between;
}

/* ── PORTFOLIO PROJECT ── */
.project-image {
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.project-image img {
  width: 100%;
  display: block;
}

.project-link {
  display: inline-block;
  margin-bottom: 16px;
}

/* ── SELECTED WORKS GRID ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.portfolio-item {
  display: block;
  text-decoration: none;
  color: var(--brand);
}

.portfolio-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--brand-2);
  aspect-ratio: 16 / 9;
}

.portfolio-thumb--design {
  aspect-ratio: 1 / 1;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-title {
  display: block;
  font-family: var(--font-display);
  margin-top: 10px;
}

.portfolio-sub {
  display: block;
  font-size: var(--fs-label);
  opacity: 0.7;
}

/* ── PORTFOLIO BAR LIST (portfolio hub page) ── */
.portfolio-bar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portfolio-bar {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-decoration: none;
  color: var(--brand);
}

.portfolio-bar:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portfolio-bar-thumb {
  flex-shrink: 0;
  width: 100px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--brand-2);
}

.portfolio-bar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.portfolio-bar-info {
  flex: 1;
  min-width: 0;
}

.portfolio-bar-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.portfolio-bar-desc {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.portfolio-bar-title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.portfolio-bar-desc {
  font-size: var(--fs-label);
  opacity: 0.7;
  margin-top: 2px;
}

.portfolio-bar-date {
  flex-shrink: 0;
  font-size: var(--fs-label);
  opacity: 0.5;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .portfolio-bar-thumb {
    width: 72px;
  }
}

/* ── RESUME (experience / education, portfolio hub page) ── */
.resume-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.resume-item-role {
  font-family: var(--font-display);
  font-size: 20px;
}

.resume-item-dates {
  font-size: var(--fs-label);
  opacity: 0.6;
  white-space: nowrap;
}

.resume-item-note {
  margin-top: 6px;
  font-size: var(--fs-label);
  opacity: 0.7;
}

.resume-item-bullets {
  margin-top: 8px;
  padding-left: 20px;
}

.resume-item-bullets li {
  font-size: var(--fs-label);
  opacity: 0.7;
  margin-top: 4px;
}

/* ── SKILLS (portfolio hub page) ── */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skills-item {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.skills-category {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 500;
  flex-shrink: 0;
  width: 100px;
}

.skills-items {
  font-size: var(--fs-label);
  opacity: 0.75;
  flex: 1;
}

/* ── JUMP NAV ── */
.jump-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.jump-nav a {
  color: var(--brand);
  text-decoration: none;
  opacity: 0.85;
}

.jump-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.qr-wrapper img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius);
  margin-top: 24px;
}
