/* James Welding Portfolio — single stylesheet, no external fonts */
:root {
  --bg: #1c1e21;
  --bg-alt: #24272b;
  --panel: #2c3035;
  --line: #3d4248;
  --text: #e6e7e9;
  --muted: #a3a8ae;
  --accent: #e8792b;      /* warm orange */
  --accent-dark: #c4611c;
  --steel: #8fa3b5;       /* steel blue-gray */
  --radius: 6px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(20, 22, 24, 0.95);
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  color: var(--text); text-decoration: none; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.05rem;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  padding: 110px 0 100px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px),
    radial-gradient(ellipse at 80% 20%, rgba(232,121,43,0.22), transparent 55%),
    linear-gradient(180deg, #25282c, #1c1e21);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  color: var(--steel); text-transform: uppercase; letter-spacing: 0.15em;
  font-size: 0.85rem; margin: 0 0 10px;
}
.hero h1 {
  margin: 0; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.tagline { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: var(--muted); max-width: 40em; margin: 18px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: var(--radius);
  text-decoration: none; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 0.95rem; border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: #1a1a1a; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: rgba(232,121,43,0.12); }
.btn-lg { font-size: 1.1rem; padding: 14px 30px; text-transform: none; word-break: break-all; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  margin: 0 0 12px; font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.section-title::after {
  content: ""; display: block; width: 60px; height: 4px;
  background: var(--accent); margin-top: 10px;
}
.section-lead { color: var(--muted); margin: 0 0 30px; font-size: 1.1rem; }
.muted { color: var(--muted); }

/* Service cards */
.cards {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin-top: 30px;
}
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-top: 4px solid var(--steel); border-radius: var(--radius);
  padding: 22px 22px 18px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-top-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

/* Gallery */
.gallery {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gallery-item {
  margin: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item figcaption { padding: 10px 14px; font-size: 0.95rem; color: var(--muted); }

/* Service area */
.area-list {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.area-list li {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); padding: 12px 22px;
  font-weight: 700; font-size: 1.1rem; border-radius: var(--radius);
}

/* Contact */
.contact { text-align: center; }
.contact .section-title::after { margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer {
  padding: 26px 0; text-align: center; color: var(--muted);
  font-size: 0.9rem; border-top: 3px solid var(--accent); background: #151719;
}
.site-footer p { margin: 0; }

@media (max-width: 600px) {
  .header-inner { justify-content: center; text-align: center; }
  .nav { justify-content: center; }
  .hero { padding: 70px 0 60px; }
  .section { padding: 56px 0; }
}

/* ---- v2: hero photo, balanced services, projects ---- */
.hero {
  background:
    linear-gradient(90deg, rgba(20,22,24,0.94) 0%, rgba(20,22,24,0.82) 55%, rgba(20,22,24,0.65) 100%),
    radial-gradient(ellipse at 80% 20%, rgba(232,121,43,0.25), transparent 60%),
    url("images/hero-tube-grid.jpg") center / cover no-repeat,
    #1c1e21;
}

/* Services: flex so the last row stretches instead of leaving an empty slot */
.cards { display: flex; flex-wrap: wrap; }
.card { flex: 1 1 240px; }

/* Featured projects */
.projects {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
}
.project {
  background: var(--panel); border: 1px solid var(--line);
  border-top: 4px solid var(--accent); border-radius: var(--radius); overflow: hidden;
}
.project .cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project-body { padding: 18px 20px 20px; }
.project-body h3 { margin: 0 0 6px; font-size: 1.2rem; }
.project-body p { margin: 0; color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.thumbs a { flex: 0 0 auto; }
.thumbs img {
  width: 84px; height: 84px; object-fit: cover; border-radius: 4px;
  border: 2px solid var(--line);
}
.thumbs a:hover img, .gallery-item a:hover img, .cover:hover img, .before-after a:hover img { opacity: 0.85; }
.thumbs a:hover img { border-color: var(--accent); }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.before-after figure { margin: 0; position: relative; }
.before-after img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.before-after figcaption {
  position: absolute; left: 6px; top: 6px; background: rgba(20,22,24,0.85);
  color: var(--text); font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 2px 8px; border-radius: 3px; border-left: 3px solid var(--accent);
}
/* More work: 4 columns on desktop, 2 on smaller screens; one wide photo keeps rows full */
.gallery { grid-template-columns: repeat(2, 1fr); }
.gallery-item img { aspect-ratio: auto; height: 300px; }
.gallery-item.wide { grid-column: span 2; }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) {
  .projects { grid-template-columns: 1fr; }
  .gallery { gap: 10px; }
  .gallery-item img { height: 200px; }
  .gallery-item figcaption { font-size: 0.85rem; padding: 8px 10px; }
}

/* ---- v3: services groups, wide project cards, patina ---- */
.nav { gap: 4px 16px; }
.svc-group {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 28px; align-items: stretch; margin-top: 36px;
}
.svc-photo { margin: 0; display: flex; flex-direction: column; }
.svc-photo a { flex: 1; display: block; min-height: 0; }
.svc-photo img {
  width: 100%; height: 100%; min-height: 280px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.svc-photo figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.group-title {
  margin: 0 0 4px; color: var(--steel); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.95rem;
}
.svc-cards .cards { margin-top: 12px; }
.svc-cards .card { flex: 1 1 260px; }

/* Featured projects: 3 columns on desktop, wide cards take 2 -> rows always full (9 cells) */
.projects { grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) {
  .projects { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
  .project.wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
  .project.wide .cover img { height: 100%; aspect-ratio: auto; }
  .project.wide.ba-only { display: block; }
}
.project.ba-only .before-after { margin-top: 0; margin-bottom: 14px; }
.project.ba-only .before-after img { aspect-ratio: 4 / 3; }
@media (max-width: 899px) { .project.ba-only .before-after img { aspect-ratio: 3 / 4; } }

/* Patina */
.patina { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: center; }
.patina-photo img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); border-top: 4px solid var(--accent); }
.patina-text .section-lead { margin-bottom: 0; }

@media (max-width: 800px) {
  .svc-group { grid-template-columns: 1fr; gap: 16px; }
  .svc-photo img { height: 340px; min-height: 0; }
  .patina { grid-template-columns: 1fr; gap: 20px; }
  .patina-text { order: -1; }
}

/* ---- v4: About ---- */
.about { padding: 56px 0; }
.about-text { max-width: 760px; }
.about-text p { margin: 0 0 10px; font-size: 1.15rem; color: var(--text); }
.about-text p:last-child { margin-bottom: 0; color: var(--muted); }

/* Experience strip */
.exp-strip {
  list-style: none; padding: 0; margin: 24px 0 8px;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.exp-strip li {
  flex: 1 1 220px; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 12px 14px; color: var(--muted); font-size: 0.92rem; line-height: 1.45;
}
.exp-strip strong {
  display: block; color: var(--text); text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 0.85rem; margin-bottom: 4px;
}
