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

:root {
  --fg: #1a1a1a;
  --fg-muted: #666;
  --bg: #fff;
  --border: #e5e5e5;
  --accent: #1a1a1a;
  --grid-gap: 2px;
  --nav-h: 56px;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 100;
}

nav .logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav ul a {
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.875rem;
  transition: color 0.15s;
}

nav ul a:hover,
nav ul a.active { color: var(--fg); }

/* ── Page wrapper ── */
main {
  padding-top: var(--nav-h);
}

/* ── Home ── */
.home {
  max-width: 640px;
  margin: 0 auto;
  padding: 90px 32px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 28px;
}

.home h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home .tagline {
  color: var(--fg-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
  margin-bottom: 28px;
}

.home-bio {
  max-width: 480px;
  margin-bottom: 40px;
}

.home-bio p {
  color: #333;
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 16px;
  text-align: left;
}

.home-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  background: var(--fg);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 999px;
  margin-bottom: 48px;
  transition: opacity 0.15s;
}

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

/* ── Contact links (shared by home) ── */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  text-align: left;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  font-size: 0.9rem;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.contact-links a:hover {
  border-color: var(--fg);
  background: #fafafa;
}

.contact-links .link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--fg-muted);
}

.contact-links .link-label {
  font-weight: 500;
}

/* ── Portfolio header (tabs + filters) ── */
.portfolio-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 0;
}

.portfolio-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.view-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
}

.view-tab {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 10px 4px;
  margin-right: 24px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.view-tab:hover { color: var(--fg); }

.view-tab.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.filter-bar {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-bar.active { display: flex; }

.filter-button {
  appearance: none;
  background: #f5f5f5;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.filter-button:hover { color: var(--fg); }

.filter-button.active {
  background: var(--fg);
  color: #fff;
}

.filter-button.discipline-product-design {
  opacity: 0.6;
}

/* ── Portfolio views ── */
.portfolio-view { display: none; }
.portfolio-view.active { display: block; }

/* ── Portfolio grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 100px;
}

.grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f0f0f0;
  cursor: pointer;
}

.grid-item.is-hidden { display: none; }

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.grid-item:hover img { transform: scale(1.04); }

.grid-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  padding: 20px;
  text-align: center;
}

.grid-item:hover .overlay { opacity: 1; }

.overlay h2 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.overlay p {
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  margin-top: 6px;
}

/* ── Timeline ── */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 32px 100px;
}

.timeline-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  margin: 40px 0 16px;
}

.timeline-year:first-child { margin-top: 0; }

.timeline-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
  color: var(--fg);
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.timeline-item:hover .timeline-title { color: var(--fg-muted); }

.timeline-date {
  flex-shrink: 0;
  width: 110px;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.timeline-title {
  font-weight: 600;
  transition: color 0.15s;
}

.timeline-disciplines {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-align: right;
}

/* ── Project page ── */
.project {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 32px 100px;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.875rem;
  margin-bottom: 40px;
  transition: color 0.15s;
}

.project-back:hover { color: var(--fg); }

.project-header { margin-bottom: 40px; }

.project-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.project-header .project-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.project-header .project-tag {
  font-size: 0.75rem;
  color: var(--fg-muted);
  background: #f5f5f5;
  padding: 4px 12px;
  border-radius: 999px;
}

.project-header .project-meta {
  color: var(--fg-muted);
  margin-top: 12px;
  font-size: 0.9rem;
}

.project-images {
  display: grid;
  gap: 12px;
  margin-bottom: 48px;
}

.project-images img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.project-body {
  max-width: 600px;
}

.project-body p {
  color: #333;
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px;
  color: var(--fg-muted);
  font-size: 0.8rem;
  border-top: 1px solid #eee;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  nav { padding: 0 16px; }
  nav ul { gap: 20px; }
  .grid { grid-template-columns: 1fr; }
  .project, .home, .portfolio-header, .timeline { padding-left: 16px; padding-right: 16px; }
  .timeline-disciplines { display: none; }
}
