﻿:root {
  --bg: #191919;
  --text: #e9e9e7;
  --muted: #9b9b99;
  --border: #2f2f2f;
  --surface: #202020;
  --surface-2: #262626;
  --accent: #9bb5ff;
  --quote: #404040;
  --header-bg: rgba(25, 25, 25, 0.9);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.58;
}

a {
  color: var(--text);
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
}

.home-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.page-cover {
  width: 100%;
  height: clamp(170px, 24vw, 280px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background-position: center;
  background-size: cover;
}

.page-wrap {
  max-width: 1240px;
  width: calc(100% - 12px);
  margin-right: auto;
  margin-left: clamp(6px, calc((100vw - 1240px) / 4), 170px);
  padding: 0 0 84px;
}

.hero {
  position: relative;
  margin-top: -72px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  display: block;
}

.hero h1 .page-icon {
  display: block;
  margin: 0 0 14px;
  transform: translateY(-34px);
}

.hero-subtitle {
  display: none;
}

.page-icon {
  width: 108px;
  height: 108px;
  border-radius: 12px;
  border: 4px solid var(--bg);
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.page-emoji {
  font-size: 1.15em;
}

.content {
  margin-top: 14px;
}

p {
  margin: 0 0 15px;
  font-size: 1.03rem;
}

h2,
h3,
h4 {
  letter-spacing: -0.015em;
  line-height: 1.14;
}

h2 {
  margin: 48px 0 16px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

h3 {
  margin: 32px 0 13px;
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
}

h4 {
  margin: 24px 0 11px;
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
}

blockquote {
  margin: 13px 0;
  padding: 10px 0 10px 15px;
  border-left: 3px solid var(--quote);
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

code {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.88em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 38px 0;
}

ul,
ol {
  margin: 0 0 16px 24px;
}

.callout {
  display: flex;
  gap: 10px;
  margin: 13px 0;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.callout-icon {
  line-height: 1.2;
}

.callout-icon img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.notion-columns {
  display: grid;
  gap: 20px;
  margin: 16px 0 24px;
  align-items: start;
}

.notion-columns.cols-1 {
  grid-template-columns: 1fr;
}

.notion-columns.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.notion-columns.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notion-columns.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notion-columns.cols-5,
.notion-columns.cols-6,
.notion-columns.cols-many {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

/* Notion static logos are 403; hide this broken strip to avoid filename artifacts */
.notion-columns:has(img[src*="LogosSoftwares_"]) {
  display: none !important;
}

img[src*="LogosSoftwares_"] {
  display: none !important;
}

.notion-columns.intro-columns {
  grid-template-columns: minmax(0, 3.35fr) minmax(220px, 1fr);
  gap: 44px;
  margin-top: 4px;
}

.notion-columns.intro-columns .notion-column:last-child {
  padding-top: 2px;
}

.notion-columns.intro-columns .notion-column:last-child blockquote {
  margin: 0 0 11px;
  padding: 2px 0 2px 13px;
  border-left: 3px solid var(--text);
}

.notion-columns.intro-columns .notion-column:last-child a {
  color: var(--text);
}

.notion-column {
  min-width: 0;
}

.notion-column > :first-child {
  margin-top: 0;
}

figure {
  margin: 14px 0;
}

img,
video,
iframe {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

iframe {
  aspect-ratio: 16 / 9;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 276px));
  gap: 12px;
  margin: 10px 0 16px;
  justify-content: start;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 188px));
  gap: 10px;
  margin: 10px 0 16px;
  justify-content: start;
}

.project-card,
.skill-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
}

.project-card:hover,
.skill-card:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--border));
}

.card-cover {
  height: 88px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}

.project-card-body,
.skill-card a {
  display: block;
  color: var(--text);
  padding: 9px 10px;
}

.skill-card {
  min-height: 126px;
}

.skill-card a {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 11px;
}

.project-card h3,
.skill-card h3 {
  margin: 0 0 6px;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-card p,
.skill-card p {
  margin: 0 0 6px;
  font-size: 0.86rem;
  color: var(--muted);
}

.skill-card h3 {
  font-size: 0.97rem;
  line-height: 1.25;
}

.skill-card p {
  font-size: 0.86rem;
  line-height: 1.35;
}

.skill-card p:last-child {
  margin-top: auto;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  margin-bottom: 6px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  border: 1px solid var(--border);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  padding: 1px 7px;
}

.file-link a {
  display: inline-block;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
}

details {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 12px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 1120px) {
  .page-wrap {
    max-width: 1120px;
    width: calc(100% - 10px);
    margin-left: 5px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 256px));
  }
}

@media (max-width: 860px) {
  .page-wrap {
    width: calc(100% - 8px);
    margin-left: 4px;
  }

  .hero {
    margin-top: -48px;
  }

  .page-icon {
    width: 84px;
    height: 84px;
  }

  .hero h1 {
    margin-top: 0;
  }

  .notion-columns,
  .notion-columns.cols-2,
  .notion-columns.cols-3,
  .notion-columns.cols-4,
  .notion-columns.intro-columns {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  h2 {
    margin-top: 40px;
  }
}
