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

/* ─── Tokens ─────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --border: #e4e4e4;
  --ink: #111111;
  --mid: #555555;
  --muted: #999999;
  --radius: 8px;
  --nav-h: 56px;
}

/* ─── Base ───────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Layout ─────────────────────────────────────── */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Nav ────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  font-family: "DM Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-mark:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--mid);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  transition:
    background 0.15s,
    color 0.15s;
}

.nav-links a:hover {
  background: var(--surface);
  color: var(--ink);
}

/* hide the old fixed-nav scrolled class — nav is now sticky */
nav.scrolled {
  border-color: var(--border);
}

/* ─── Hero ───────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

/* override old positioning */
.hero-index {
  display: none;
}
.hero-rule {
  display: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.1s forwards;
}

.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.hero-name {
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  overflow: visible;
  margin-bottom: 1rem;
}

.hero-name-inner {
  display: block;
  transform: translateY(0);
  animation: none;
}

.hero-desc-row {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--mid);
  max-width: 52ch;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.25s forwards;
}

.hero-desc em {
  font-style: normal;
  color: var(--ink);
  font-weight: 500;
}

.hero-cta-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.35s forwards;
  margin-left: auto;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.cta-primary:hover {
  opacity: 0.8;
}

.cta-primary svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.cta-secondary-label {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ─── Section header ─────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-title-text {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.section-count {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ─── Projects ───────────────────────────────────── */
.projects {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

/* hide old layout helpers */
.projects-header,
.projects-heading,
.projects-note {
  display: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-card {
  all: unset;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.project-card:hover {
  background: var(--surface);
}

/* remove old hover fill */
.project-card::after {
  display: none;
}

/* reset old grid-column sizing */
.project-card--featured,
.project-card--side,
.project-card--half {
  grid-column: auto;
}

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.project-card:hover .project-icon {
  border-color: #ccc;
}

.project-body {
  flex: 1;
  min-width: 0;
}

.project-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
  transition: color 0.15s;
}

/* reset old large heading size */
.project-name {
  font-size: 0.9rem !important;
  line-height: 1.3 !important;
}

.project-desc {
  font-size: 0.83rem;
  color: var(--mid);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* override hover color change from old design */
.project-card:hover .project-desc {
  color: var(--mid);
}
.project-card:hover .project-name {
  color: var(--ink);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.project-tag {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.project-tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
}

/* hide old project footer / link arrow */
.project-footer {
  display: none;
}
.project-link-arrow {
  display: none;
}
.project-link-label {
  display: none;
}

.project-arrow {
  color: var(--muted);
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
  flex-shrink: 0;
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* non-link card (coming soon) */
.project-card[style*="cursor: default"] {
  cursor: default;
  opacity: 0.6;
}

.project-card[style*="cursor: default"]:hover {
  background: var(--bg);
}

/* ─── About ──────────────────────────────────────── */
.about {
  padding: 4rem 0;
  display: block;
}

.about-left {
  margin-bottom: 2rem;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0;
  display: block;
}

/* neutralize old big heading */
.about-heading {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 0.5rem;
}

.about-heading em {
  font-style: normal;
  color: var(--mid);
  font-weight: 400;
}

.about-right {
  padding-top: 0;
}

.about-body {
  font-size: 0.93rem;
  color: var(--mid);
  line-height: 1.75;
  max-width: 60ch;
  margin-bottom: 2rem;
}

.about-body p + p {
  margin-top: 0.9rem;
}

.about-body strong {
  color: var(--ink);
  font-weight: 500;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.about-stat {
  background: var(--bg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: none !important;
}

.stat-label {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  font-family: "DM Mono", monospace;
}

/* ─── Footer ─────────────────────────────────────── */
footer {
}

.footer-links a:hover {
  background: var(--surface);
  color: var(--ink);
}

.footer-copy {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ─── Scroll reveal ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Animations ─────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Cursor: restore default ────────────────────── */
.cursor {
  display: none;
}
.cursor-ring {
  display: none;
}
body {
  cursor: auto;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }
  .hero-cta-block {
    margin-left: 0;
  }
  .hero-desc-row {
    flex-direction: column;
    gap: 1.25rem;
  }
  .nav-links {
    display: none;
  }
  .projects,
  .about {
    padding: 3rem 0;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
}
