/* ═══════════════════════════════════════════
   Danika Land — Portfolio  |  Shared Styles
   ═══════════════════════════════════════════ */

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

:root {
  --bg:           #fafafa;
  --surface:      #ffffff;
  --text:         #1a1a1a;
  --muted:        #6b7280;
  --accent:       #2563eb;
  --accent-light: #eff6ff;
  --border:       #e5e7eb;
  --radius:       12px;
  --max-w:        760px;
  --nav-h:        60px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

/* ───────────── TYPOGRAPHY ───────────── */
h1 { font-size: clamp(2rem, 5vw, 3rem);   font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
h3 { font-size: 1.05rem; font-weight: 600; }
p  { color: var(--muted); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───────────── LAYOUT HELPERS ───────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }

/* ───────────── NAV ───────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color 0.2s;
}

nav.scrolled { border-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ───────────── DIVIDER ───────────── */
hr.divider { border: none; border-top: 1px solid var(--border); }

/* ───────────── SECTION LABELS ───────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  color: var(--text);
  margin-bottom: 28px;
}

/* ───────────── BUTTONS ───────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  border: none;
}

.btn:hover { opacity: 0.85; text-decoration: none; transform: translateY(-1px); }

.btn-primary  { background: var(--accent); color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}

/* ───────────── HERO (index) ───────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}

.hero-content { display: flex; flex-direction: column; gap: 20px; }
.hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-title { color: var(--text); }
.hero-sub   { font-size: 1.15rem; max-width: 520px; color: var(--muted); }
.hero-ctas  { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ───────────── ABOUT ───────────── */
#about { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p + p { margin-top: 12px; }

.skills-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.skill-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

/* ───────────── PROJECTS (index) ───────────── */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h3 { color: var(--text); }
.card p  { font-size: 0.9rem; flex: 1; }

.card-arrow {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

/* ───────────── CONTACT ───────────── */
#contact { background: var(--surface); text-align: center; }

.contact-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.contact-inner p { max-width: 460px; }

.contact-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ───────────── FOOTER ───────────── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   PROJECT DETAIL PAGE STYLES
   ═══════════════════════════════════════════ */

.page-body {
  padding-top: var(--nav-h);
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  padding: 32px 0 0;
  transition: color 0.15s;
}

.back-link:hover { color: var(--text); text-decoration: none; }

/* ── Project header ── */
.project-header {
  padding: 40px 0 56px;
  border-bottom: 1px solid var(--border);
}

.project-header .section-label { margin-bottom: 12px; }

.project-header h1 {
  color: var(--text);
  margin-bottom: 16px;
}

.project-desc {
  font-size: 1.1rem;
  max-width: 560px;
  color: var(--muted);
  margin-bottom: 24px;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

.tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

.project-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Image placeholder ── */
.project-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 56px 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ── Content sections ── */
.project-content { padding: 0 0 88px; }

.content-block { margin-bottom: 48px; }
.content-block h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.content-block p { color: var(--muted); line-height: 1.75; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ── Project navigation ── */
.project-nav {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-nav-link span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-nav-link strong {
  font-size: 0.95rem;
  color: var(--text);
}

.project-nav-link:hover strong { color: var(--accent); }
.project-nav-link:hover { text-decoration: none; }

.project-nav-link.right { text-align: right; }

/* ───────────── FLYWHEEL CROSSFADE ───────────── */
.flywheel-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  margin: 20px 0 8px;
  overflow: hidden;
}

.flywheel-base {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}

.flywheel-highlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-radius: var(--radius);
  animation: flywheel-crossfade 6s ease-in-out infinite;
}

@keyframes flywheel-crossfade {
  0%, 40%   { opacity: 1; }
  50%, 90%  { opacity: 0; }
  100%      { opacity: 1; }
}

/* ───────────── INSIGHT CARDS ───────────── */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0 16px;
}

.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.insight-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.insight-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.opportunity-box {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 28px;
  margin: 16px 0 8px;
}

.opportunity-box .opp-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.opportunity-box p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .insight-grid { grid-template-columns: 1fr; }
}

/* ───────────── IMPACT GRID ───────────── */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 8px;
}

.impact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.impact-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.impact-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}

.impact-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.impact-card li {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 12px;
  position: relative;
}

.impact-card li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--border);
}

.impact-card strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 600px) {
  .impact-grid { grid-template-columns: 1fr; }
}

/* ───────────── LEARNINGS ───────────── */
.learnings-group {
  margin-bottom: 32px;
}

.learnings-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.learnings-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.learnings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.learning-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.learning-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.learning-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .learnings-grid { grid-template-columns: 1fr; }
}

/* ───────────── CASE STUDY INLINE IMAGES ───────────── */
.content-image {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  margin: 20px 0 8px;
}

.image-caption {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
  font-style: italic;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 8px;
}

.image-grid img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.labeled-image {
  display: flex;
  flex-direction: column;
}

.labeled-image img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.image-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .image-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ───────────── HORIZONTAL SCROLL ───────────── */
.scroll-x {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 14px;
  padding-bottom: 12px;
  margin-top: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-x::-webkit-scrollbar {
  height: 4px;
}

.scroll-x::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 2px;
}

.scroll-x::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 2px;
}

.scroll-x img {
  height: 480px;
  width: auto;
  flex-shrink: 0;
  border-radius: 10px;
  scroll-snap-align: start;
  display: block;
}

.scroll-group {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  scroll-snap-align: start;
  width: min-content;
}

.scroll-group > img {
  height: 480px;
  width: auto;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}

.scroll-group-images {
  display: flex;
  flex-direction: row;
  gap: 14px;
}

.scroll-group-images img {
  height: 480px;
  width: auto;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
}

.scroll-group-caption {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  margin-top: 8px;
  width: 100%;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ───────────── RESPONSIVE ───────────── */
@media (max-width: 600px) {
  .about-grid  { grid-template-columns: 1fr; gap: 28px; }
  .detail-grid { grid-template-columns: 1fr; }
  .nav-links   { gap: 20px; }
  .project-nav { flex-direction: column; align-items: flex-start; }
  .project-nav-link.right { text-align: left; }
}
