:root {
  --bg: #0c0c0e;
  --panel: #0c0c0e;
  --card: #141417;
  --card-hover: #17171b;
  --border: #26262c;
  --border-bright: #3a3a42;
  --text: #eceae4;
  --muted: #8f8f98;
  --muted-dim: #6a6a72;
  --accent: #e0a869;      /* warm sand — used sparingly */
  --accent-soft: rgba(224, 168, 105, 0.12);
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04";
}

a { color: inherit; text-decoration: none; }

/* ----------------------------------------------------------------- Layout */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- Sidebar */
.sidebar {
  width: 40%;
  max-width: 460px;
  min-width: 340px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
}

.sidebar-inner { display: flex; flex-direction: column; }

.headshot {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.headshot span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--muted);
  letter-spacing: 1px;
}

.headshot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}

.sidebar h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.role {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--accent);
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
}

.bio {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 34ch;
  margin-bottom: 2rem;
}

/* Social icons */
.socials { display: flex; gap: 1rem; margin-bottom: 2rem; }

.socials a {
  color: var(--muted);
  display: inline-flex;
  transition: color 0.2s ease, transform 0.2s ease;
}

.socials a:hover { color: var(--accent); transform: translateY(-2px); }

.sidebar-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--text);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn:hover { opacity: 0.85; transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}

.btn-ghost:hover { border-color: var(--text); opacity: 1; }

/* ---------------------------------------------------------------- Content */
.content {
  flex: 1;
  padding: 4rem 3.5rem;
  min-width: 0;
}

.content-head { margin-bottom: 2rem; }

.content h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.content-sub { color: var(--muted); font-size: 0.95rem; margin-top: 0.35rem; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

/* Project groups */
.project-group { margin-top: 2.75rem; }

.group-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-dim);
  margin-bottom: 1.1rem;
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  background: var(--card-hover);
}

.card.is-featured { border-color: rgba(224, 168, 105, 0.35); }

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101013;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-placeholder {
  position: absolute;
  color: var(--muted-dim);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.thumb img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.card-title h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.card-body p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Badges */
.badge {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.badge-status { color: var(--accent); border: 1px solid rgba(224, 168, 105, 0.4); }
.badge-featured { color: var(--bg); background: var(--accent); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

.tags span {
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* Card links */
.card-links { display: flex; gap: 1rem; margin-top: 1rem; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.card-link:hover { color: var(--accent); }

/* Contact */
.contact { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.contact p { color: var(--muted); margin: 0.75rem 0 1.5rem; max-width: 46ch; }

/* Footer */
.footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted-dim);
  font-size: 0.82rem;
}

/* -------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    max-width: none;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 2.5rem;
    justify-content: flex-start;
  }
  .bio { max-width: none; }
  .content { padding: 2.5rem; }
}

@media (max-width: 520px) {
  .sidebar, .content { padding: 1.75rem; }
  .card-grid { grid-template-columns: 1fr; }
}
