/* Shared minimal styles for project detail pages */
:root {
  --brand: #4a90e2;
  --brand-600: #3f7fd0;
  --text: #1e1e1e;
  --muted: #5c5c5c;
  --border: #e6e6e6;
  --bg: #ffffff;
  --chip-bg: #f5f9ff;
  --radius-lg: 12px;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-1: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.08);
  --transition: 180ms ease;
}

body.dark-mode {
  --text: #e6e6e6;
  --muted: #b5b5b5;
  --border: #3a3a3a;
  --bg: #151515;
  --chip-bg: #2b2b2b;
}

.main-project {
  width: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 64px 24px;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  animation: fadeIn 0.6s ease;
}

.project-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
  gap: 44px;
  max-width: 1080px;
  width: 100%;
}

.project-visual {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-visual img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .project-visual:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
  }
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 120%;
  color: var(--text);
}

.project-subtitle {
  margin: 0;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 160%;
  color: var(--muted);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: var(--chip-bg);
  color: var(--brand);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(74, 144, 226, 0.35);
  transition: background var(--transition), border-color var(--transition);
}

@media (hover: hover) and (pointer: fine) {
  .chip:hover {
    background: rgba(74, 144, 226, 0.08);
    border-color: rgba(74, 144, 226, 0.55);
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.primary-btn,
.secondary-btn,
.disabled-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

.primary-btn {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.22);
}
.primary-btn:hover {
  background: var(--brand-600);
  transform: translateY(-1px);
}
.primary-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.primary-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.secondary-btn:hover {
  background: var(--chip-bg);
  transform: translateY(-1px);
}
.secondary-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.secondary-btn:active {
  transform: translateY(0);
}

.disabled-btn {
  background: #e9e9e9;
  color: #9a9a9a;
  cursor: not-allowed;
  border-color: #e9e9e9;
}
body.dark-mode .disabled-btn {
  background: #333;
  color: #888;
  border-color: #333;
}

.section {
  max-width: 880px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.section h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--text);
}
.section p,
.section ul {
  color: var(--muted);
  margin: 0;
  line-height: 165%;
}
.section ul {
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.section a {
  color: var(--brand);
  text-underline-offset: 3px;
}
.section a:hover {
  color: var(--brand-600);
}

@media (max-width: 980px) {
  .project-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .project-visual img {
    max-height: 280px;
  }
}
@media (max-width: 900px) {
  .main-project {
    padding: 48px 20px;
  }
  .section {
    grid-template-columns: 1fr;
  }
}

/* Small phones */
@media (max-width: 640px) {
  .main-project {
    padding: 40px 16px;
    gap: 36px;
  }
  .project-visual img {
    max-height: 220px;
  }
  .project-title {
    font-size: clamp(24px, 7vw, 32px);
  }
  .actions {
    gap: 10px;
  }
  /* Make primary action easy to tap */
  .actions .primary-btn {
    min-height: 44px;
  }
  .actions .secondary-btn {
    min-height: 44px;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
