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

:root {
  --bg: #f7f3ed;
  --bg-card: #ffffff;
  --green: #1a3a2a;
  --green-mid: #2d5c42;
  --green-light: #e8f0eb;
  --amber: #c8933a;
  --amber-dim: rgba(200,147,58,0.12);
  --ink: #1c1c1a;
  --ink-2: #4a4a45;
  --ink-3: #8a8a82;
  --ink-4: #c4c4bc;
  --shadow: 0 2px 12px rgba(26,58,42,0.08), 0 1px 3px rgba(26,58,42,0.05);
  --shadow-hover: 0 8px 32px rgba(26,58,42,0.14), 0 2px 8px rgba(26,58,42,0.08);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --header-height: 68px;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body::-webkit-scrollbar { width: 4px; }
body::-webkit-scrollbar-track { background: var(--bg); }
body::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 2px; }

/* ── Header ── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(247,243,237,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 100;
}

.header-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  font-style: italic;
  letter-spacing: -0.01em;
}

.header-name span { color: var(--amber); font-style: normal; }

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-role {
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.header-divider { width: 1px; height: 16px; background: var(--ink-4); }

.header-socials { display: flex; align-items: center; gap: 0.65rem; }

.header-socials a {
  color: var(--ink-3);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.header-socials a:hover { color: var(--green); }
.header-socials svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Main ── */

.site-main { padding-top: var(--header-height); }

.page-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2.5rem 6rem;
}

/* ── About ── */

.about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding-bottom: 4rem;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--ink-4);
  align-items: start;
}

.about-left {}

.about-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.about-name {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-style: italic;
  margin-bottom: 1rem;
}

.about-tags {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.about-tag {
  font-size: 0.75rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

.about-right {}

.about-bio {
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.about-bio strong {
  color: var(--ink);
  font-weight: 600;
}

.about-bio-secondary {
  font-size: 0.88rem;
  color: var(--ink-3);
  line-height: 1.75;
}

/* ── Portfolio section ── */

.portfolio-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.portfolio-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portfolio-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-4);
}

/* ── Card grid ── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(26,58,42,0.06);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.4s ease;
  filter: saturate(0.6) brightness(0.97);
}

.card:hover .card-image img {
  transform: scale(1.05);
  filter: saturate(1) brightness(1);
}

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

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.card-links { display: flex; gap: 0.35rem; flex-shrink: 0; margin-top: 0.15rem; }

.card-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--green-mid);
  background: var(--green-light);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.card-link:hover { background: var(--green); color: #fff; }

.card-description {
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.65;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--green-light);
  margin-top: auto;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-3);
  background: var(--bg);
  border-radius: 3px;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--ink-4);
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-name { font-size: 2.2rem; }
}

@media (max-width: 640px) {
  .site-header { padding: 0 1.25rem; }
  .header-role, .header-divider { display: none; }
  .page-content { padding: 2.5rem 1.25rem 4rem; }
  .card-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (min-width: 1600px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}