/* ===================================================================
   arek.ca - shared site styles
   Add new pages by linking this file + site.js and reusing the .nav,
   section, card, and footer patterns defined here.
   =================================================================== */

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

:root {
  /* Surfaces - warm dark charcoal */
  --bg:          #17150f;
  --bg-soft:     #1d1a14;
  --surface:     #24211a;
  --surface-2:   #2b271f;

  /* Text - warm cream/off-white */
  --ink:         #f4efe6;
  --ink-mid:     #cec6b7;
  --muted:       #9a9284;
  --faint:       #6b6558;

  /* Primary accent - baby blue */
  --blue:        #8fcbe8;
  --blue-mid:    #6fb3d6;
  --blue-deep:   #4d93b8;

  /* Secondary accent - warm sand/cream, for contrast against the blue */
  --sand:        #e6c79a;
  --sand-mid:    #d3ab72;
  --sand-deep:   #b58a55;

  --white:       #ffffff;
  --border:      rgba(244, 239, 230, 0.10);
  --border-strong: rgba(244, 239, 230, 0.18);
  --shadow:      rgba(0, 0, 0, 0.5);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 100px;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 6vw;
  background: rgba(23, 21, 15, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--blue); }

.nav-cta {
  background: var(--blue);
  color: var(--bg) !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--r-pill);
  transition: background 0.2s, color 0.2s !important;
}

.nav-cta:hover { background: var(--blue-mid) !important; color: var(--bg) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue);
  color: var(--bg);
  padding: 0.85rem 2rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: var(--blue-mid); transform: translateY(-2px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--sand);
  padding: 0.85rem 2rem;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(230, 199, 154, 0.35);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn-outline:hover { border-color: var(--sand); color: var(--sand-mid); transform: translateY(-2px); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 6vw 5rem;
  gap: 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 55vw;
  height: 55vw;
  right: -15vw;
  top: -10vw;
  background: radial-gradient(ellipse at center, var(--sand) 0%, transparent 70%);
  opacity: 0.10;
  border-radius: 50%;
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--blue);
  background: rgba(143, 203, 232, 0.08);
  border: 1px solid rgba(143, 203, 232, 0.28);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-pill);
  margin-bottom: 1.4rem;
}

.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
}

h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

h1 em {
  font-style: italic;
  color: var(--blue);
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.6rem 1.4rem;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }

.stat-card.accent {
  background: linear-gradient(160deg, rgba(230, 199, 154, 0.14), var(--surface));
  border-color: rgba(230, 199, 154, 0.25);
}

.stat-number {
  font-family: 'DM Serif Display', serif;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 0.35rem;
}

.stat-card.accent .stat-number { color: var(--sand); }

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.expertise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.8rem 1.6rem;
}

.expertise-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--ink);
  font-weight: 400;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(143, 203, 232, 0.08);
  border: 1px solid rgba(143, 203, 232, 0.25);
  color: var(--blue);
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 500;
}

/* ─── SECTION SHARED ─── */
section { padding: 6rem 6vw; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 400;
}

.section-desc {
  color: var(--muted);
  max-width: 560px;
  line-height: 1.75;
  font-size: 1.02rem;
}

/* ─── EXPERIENCE (grouped era highlights) ─── */
.experience { background: var(--bg-soft); }

.experience-intro { max-width: 640px; margin-bottom: 3rem; }

.eras-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.era-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.8rem 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}

.era-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }

.era-range {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sand);
  margin-bottom: 0.5rem;
}

.era-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
  font-weight: 400;
}

.era-desc { font-size: 0.92rem; color: var(--muted); line-height: 1.7; }

/* ─── ABOUT ─── */
.about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.2rem;
}

.about-pill-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.about-pill-value { font-size: 0.92rem; color: var(--ink-mid); line-height: 1.5; }

/* ─── INTERESTS ─── */
.interests { background: var(--bg-soft); }

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.interest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s, border-color 0.2s;
}

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

.interest-card .interest-thumb {
  height: 190px;
  width: 100%;
  object-fit: cover;
  background: var(--surface-2);
}

.interest-card .interest-body { padding: 1.4rem 1.5rem 1.6rem; }

.interest-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sand);
  margin-bottom: 0.6rem;
}

.interest-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-weight: 400;
}

.interest-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.65; margin-bottom: 0.9rem; }

.interest-link { font-size: 0.85rem; font-weight: 600; color: var(--blue); }

.interests-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--faint);
  font-style: italic;
}

/* ─── CONTACT ─── */
.contact { background: var(--bg); }

.contact-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 4rem 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-links { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }

.contact-email,
.contact-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  transition: transform 0.2s, opacity 0.2s;
}

.contact-email {
  background: var(--blue);
  color: var(--bg);
  padding: 1.1rem 2.2rem;
  border-radius: var(--r-pill);
}

.contact-email:hover { transform: translateY(-2px); background: var(--blue-mid); }

.contact-secondary { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.contact-secondary:hover { color: var(--sand); }

/* ─── PAGE HEADER (for non-home pages, e.g. gallery) ─── */
.page-header {
  padding: 9rem 6vw 2rem;
  text-align: center;
}

.page-header .section-label { display: block; }

.page-header h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }

.page-header .hero-sub { max-width: 560px; margin: 0 auto; }

/* ─── FOOTER ─── */
footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  color: var(--faint);
  padding: 1.8rem 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
}

footer a { color: var(--sand-mid); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  color: var(--ink-mid);
}

.footer-logo span { color: var(--blue); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-text > * { animation: fadeUp 0.7s ease both; }
.hero-text > *:nth-child(1) { animation-delay: 0.05s; }
.hero-text > *:nth-child(2) { animation-delay: 0.15s; }
.hero-text > *:nth-child(3) { animation-delay: 0.25s; }
.hero-text > *:nth-child(4) { animation-delay: 0.35s; }

.stat-card { animation: fadeUp 0.6s ease both; }
.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.5s; }
.stat-card:nth-child(4) { animation-delay: 0.6s; }
.expertise-card { animation: fadeUp 0.6s 0.7s ease both; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 7rem; }
  .hero::before { display: none; }
  .eras-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 6vw 1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.7rem 0; }
  .nav-cta { display: inline-block; margin-top: 0.4rem; }
  .about-right { grid-template-columns: 1fr; }
  .contact-inner { flex-direction: column; text-align: center; align-items: center; }
  .contact-links { align-items: center; }
}
