/* ============================================================
   style.css — Dan Jones Portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- Variables ---- */
:root {
  --bg: #ffffff;
  --bg-soft: #F8F9FA;
  --text: #111111;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #EFF6FF;
  --accent-border: #BFDBFE;
  --border: #E5E7EB;
  --dark: #0F172A;
  --dark-2: #1E293B;
  --dark-3: #334155;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --max-width: 1100px;
  --t: 0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--dark); color: #fff; }

/* ---- Nav ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}
.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo-jones { color: #60A5FA; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cv {
  color: var(--accent) !important;
  border: 1.5px solid var(--accent-border) !important;
  padding: 7px 16px;
  border-radius: 7px;
  font-weight: 600 !important;
  transition: all var(--t) !important;
}
.nav-cv:hover { background: var(--accent-light) !important; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--t);
  cursor: pointer;
  border: none;
  font-family: inherit;
  line-height: 1;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37,99,235,0.35); }
.btn-secondary { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--text); background: var(--bg-soft); }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1.5px solid rgba(255,255,255,0.15); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }

/* ---- Typography helpers ---- */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 52px;
}
.section-dark .section-sub { color: #94A3B8; }
.section-dark .section-label { color: #60A5FA; }

/* ---- Hero ---- */
.hero {
  padding: 148px 0 100px;
  background: var(--dark);
  color: #fff;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.25);
  color: #93C5FD;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3B82F6;
}
.hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero h1 em { color: #60A5FA; font-style: normal; }
.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: #94A3B8;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 44px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 52px;
  margin-top: 76px;
  padding-top: 44px;
  border-top: 1px solid #1E293B;
}
.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.8125rem;
  color: #475569;
  margin-top: 2px;
}

/* ---- Page Hero ---- */
.page-hero {
  padding: 120px 0 60px;
  background: var(--dark);
  color: #fff;
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 1.125rem;
  color: #94A3B8;
  max-width: 540px;
}

/* ---- Project Cards ---- */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t);
  background: var(--bg);
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent-border); }
.project-card-top {
  background: var(--dark-2);
  padding: 36px 28px 28px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.project-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.project-card-title { font-size: 1.375rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.project-card-body { padding: 24px 28px 28px; }
.project-desc { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

/* ---- Capabilities ---- */
.capabilities-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cap-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  transition: all var(--t);
}
.cap-card:hover { background: #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }
.cap-icon { font-size: 1.75rem; margin-bottom: 14px; }
.cap-name { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 8px; }
.cap-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* ---- About teaser ---- */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.about-split h2 { font-size: clamp(1.5rem, 2.5vw, 2.125rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.about-split p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.75; font-size: 0.9375rem; }
.skill-row { margin-bottom: 14px; }
.skill-row-label { display: flex; justify-content: space-between; font-size: 0.8125rem; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
.skill-row-label strong { color: var(--text); }
.bar-track { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }

/* ---- Cards generic ---- */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: all var(--t); }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ---- Timeline ---- */
.timeline { padding-left: 28px; border-left: 2px solid var(--border); }
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -36px;
  top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-period { font-size: 0.8125rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 5px; }
.timeline-role { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.timeline-company { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 12px; }
.timeline-desc { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.75; }
.timeline-desc li { padding-left: 16px; position: relative; margin-bottom: 6px; }
.timeline-desc li::before { content: '–'; position: absolute; left: 0; color: var(--text-light); }

/* ---- Skills grid ---- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skill-chip {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  background: var(--bg);
  transition: all var(--t);
}
.skill-chip:hover { border-color: var(--accent-border); color: var(--text); background: var(--accent-light); }
.skill-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ---- Case studies (Projects page) ---- */
.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}
.case-study:last-child { border-bottom: none; }
.case-study.reverse > .case-study-map { order: -1; }
.case-study h2 { font-size: clamp(1.5rem, 2.5vw, 2.125rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.case-desc { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.8; margin-bottom: 20px; }
.case-meta { margin-bottom: 24px; }
.case-meta-item { display: flex; gap: 8px; font-size: 0.9rem; margin-bottom: 8px; }
.case-meta-item strong { font-weight: 600; min-width: 90px; }
.case-meta-item span { color: var(--text-muted); }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); height: 380px; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 5fr 4fr; gap: 72px; align-items: start; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; }
.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-textarea { resize: vertical; min-height: 140px; }
.contact-info-box { margin-top: 16px; }
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-item:first-child { border-top: 1px solid var(--border); }
.ci-icon { width: 38px; height: 38px; border-radius: 8px; background: var(--accent-light); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.ci-label { font-size: 0.8125rem; color: var(--text-muted); }
.ci-value { font-size: 0.9375rem; font-weight: 500; color: var(--text); }
.ci-value a { color: var(--accent); }
.ci-value a:hover { text-decoration: underline; }

/* ---- Contact form (bare elements) ---- */
.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.contact-form textarea { resize: vertical; min-height: 140px; }

/* ---- Footer ---- */
footer {
  background: var(--dark);
  color: #fff;
  padding: 64px 0 32px;
}
footer .nav-logo { color: #E2E8F0; }
footer .nav-logo span[style] { color: #60A5FA !important; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer-brand-tagline { font-size: 0.875rem; color: #475569; margin-top: 10px; line-height: 1.65; max-width: 240px; }
.footer-col h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #475569; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9375rem; color: #64748B; transition: color var(--t); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid #1E293B;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #334155;
}

/* ---- Scroll animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---- Misc ---- */
.divider { height: 1px; background: var(--border); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

/* ---- Hamburger / mobile nav ---- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  z-index: 210;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Tag filter chips (projects page) ---- */
.tag-filter-wrap {
  padding: 20px 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tag-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  flex-shrink: 0;
}
.tag-filter-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.tag-filter-chip:hover { border-color: var(--accent-border); color: var(--accent); }
.tag-filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tag-filter-chip.all-chip { border-style: dashed; }
.project-card-featured.tag-hidden { display: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .capabilities-grid { grid-template-columns: repeat(2, 1fr); }
  .case-study { grid-template-columns: 1fr; gap: 36px; }
  .case-study.reverse > .case-study-map { order: 0; }
  .about-split { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

/* ---- Mobile nav (≤768px only — zero impact on desktop) ---- */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0 0 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 28px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .nav-links a.active, .nav-links a:hover { color: var(--accent); }
  .nav-cv {
    margin: 12px 28px 0 !important;
    text-align: center;
    border-radius: 8px !important;
  }
  .personal-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 680px) {
  .project-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .capabilities-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
}
