/* ─── Design tokens ─────────────────────────────────────── */

:root {
  --bg:            #f9f9f7;
  --surface:       #ffffff;
  --border:        rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text:          #0f172a;
  --text-2:        #475569;
  --text-3:        #94a3b8;
  --green:         #16a34a;
  --mono:          ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --r:             8px;
}

/* ─── Base ──────────────────────────────────────────────── */

body {
  background: var(--bg);
  color: var(--text);
}

.page-content {
  padding-top: 0;
}

/* ─── Wrapper ───────────────────────────────────────────── */

.pw {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ─── Terminal bar ──────────────────────────────────────── */

.term-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  border-bottom: 0.5px solid var(--border-strong);
  padding: 22px 0 16px;
  margin-bottom: 40px;
}

.term-online { color: var(--green); }

@keyframes blink { 50% { opacity: 0; } }
.term-cursor {
  animation: blink 1s step-end infinite;
  color: var(--green);
}

/* ─── Profile ───────────────────────────────────────────── */

.profile {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 44px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  max-width: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5px solid var(--border-strong);
  flex-shrink: 0;
  background: var(--surface);
}

.profile-body h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.profile-tagline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  margin: 0 0 16px;
}

.profile-bio {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-2);
  margin: 0 0 20px;
  max-width: 520px;
}

.profile-bio p {
  margin: 0 0 12px;
}

.profile-bio p:last-child {
  margin: 0;
}

.profile-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-link {
  font-family: var(--mono);
  font-size: 12px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--r);
  padding: 6px 12px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.profile-link:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ─── Tab bar ───────────────────────────────────────────── */

.tab-bar {
  display: flex;
  gap: 24px;
  border-bottom: 0.5px solid var(--border-strong);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.tab-btn {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  letter-spacing: 0.02em;
}

.tab-btn.active { color: var(--text); }
.tab-btn:hover  { color: var(--text-2); }

/* ─── Projects grid ─────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-bottom: 60px;
}

.project-card {
  background: var(--surface);
  border: 0.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
  cursor: default;
}

.project-card:hover {
  border-color: var(--text);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-icon {
  width: 34px;
  height: 34px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
}

.card-icon i {
  font-size: 17px;
  color: var(--text);
}

.card-icon img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: var(--r);
  display: block;
}

.card-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}

.card-name {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 5px;
  color: var(--text);
}

.card-tags {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  margin: 0 0 8px;
  line-height: 1.5;
}

.card-summary {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

/* ─── Card expanded (hover) ─────────────────────────────── */

.card-expanded {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity    0.25s ease 0.06s,
    margin-top 0.3s ease;
}

.project-card:hover .card-expanded {
  max-height: 200px;
  opacity: 1;
  margin-top: 12px;
}

.card-expanded p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-3);
  margin: 0 0 10px;
  border-top: 0.5px solid var(--border);
  padding-top: 10px;
}

.card-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 0.5px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.15s;
}

.card-link:hover { opacity: 0.5; }

/* ─── Sports section ────────────────────────────────────── */

.sports-section {
  padding-bottom: 60px;
}

.sports-list {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
}

.sports-list li {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.sports-list li::before {
  content: '//';
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}

.sports-photo-block {
  max-width: 540px;
}

.sports-photo-block img {
  width: 100%;
  border-radius: 10px;
  border: 0.5px solid var(--border-strong);
  display: block;
  margin-bottom: 12px;
}

.sports-caption {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-3);
  margin: 0 0 28px;
}

/* ─── Responsive ────────────────────────────────────────── */

@media (max-width: 640px) {
  .profile {
    flex-direction: column;
    gap: 18px;
  }

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

@media (min-width: 641px) and (max-width: 860px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
