/* ===== VARIABLES ===== */
:root {
  --navy: #1e293b;
  --navy-dark: #0f172a;
  --navy-light: #334155;
  --gold: #d97706;
  --gold-light: #f59e0b;
  --gold-pale: #fef3c7;
  --white: #ffffff;
  --bg: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --radius: 10px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.08);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAVIGATION ===== */
nav {
  background: var(--navy-dark);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--gold);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}
.logo span { color: var(--gold-light); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--gray-200);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold-light); text-decoration: none; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 4rem 2rem 3.5rem;
  text-align: center;
}
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}
.hero-role {
  color: var(--gold-light);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-tagline {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

/* Typing Cert Badge */
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 1rem 1.75rem;
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
  flex-wrap: wrap;
  justify-content: center;
}
.cert-icon { font-size: 1.75rem; }
.cert-stat { text-align: center; }
.cert-number {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
}
.cert-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-top: 0.25rem;
}
.cert-divider {
  width: 1px;
  height: 35px;
  background: rgba(255,255,255,0.2);
}
.cert-verify {
  font-size: 0.85rem;
  color: var(--white);
  border: 1px solid var(--gold);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.cert-verify:hover {
  background: var(--gold);
  color: var(--navy-dark);
  text-decoration: none;
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 2rem;
}
.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.stat-item .stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}
.stat-item .stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.35rem;
}

/* ===== SECTIONS ===== */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.section-title {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  min-width: 40px;
}

/* ===== SKILLS ===== */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.skill-tag {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.2s;
}
.skill-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

/* ===== PROJECT CARDS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-bottom: 3px solid var(--gold);
}
.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-body h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.project-tool {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}
.project-desc {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.project-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.p-metric {
  background: var(--gray-100);
  padding: 0.6rem;
  border-radius: 6px;
  text-align: center;
}
.p-metric .p-value {
  display: block;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
.p-metric .p-label {
  display: block;
  font-size: 0.7rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.project-link {
  margin-top: auto;
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.1rem;
  width: fit-content;
}
.project-link:hover { color: var(--gold); text-decoration: none; }

/* ===== ABOUT / CONTACT ===== */
.text-block {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--gray-600);
  line-height: 1.7;
}
.text-block p + p { margin-top: 1rem; }
.contact-links { margin-top: 1rem; }
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 1.5rem;
  font-weight: 500;
}

/* ===== FOOTER ===== */
footer {
  background: var(--navy-dark);
  color: var(--gray-400);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}
footer a { color: var(--gold-light); }

/* ===== SPREADSHEET LINK BOX ===== */
.sheet-link-box {
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.sheet-link-box p {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}
.sheet-link-box .sheet-btn {
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s;
}
.sheet-link-box .sheet-btn:hover {
  background: var(--gold);
  color: var(--navy-dark);
  text-decoration: none;
}

/* ===== PROJECT DETAIL PAGES ===== */
.project-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 3rem 2rem;
}
.project-hero-inner { max-width: 1100px; margin: 0 auto; }
.project-hero h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 0.5rem; }
.project-hero .tools {
  color: var(--gold-light);
  font-weight: 600;
  font-size: 1rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gray-300);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--white); text-decoration: none; }

/* Detail Metrics */
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.d-metric {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
}
.d-metric .d-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-light);
}
.d-metric .d-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.75;
  margin-top: 0.25rem;
}

/* Narrative */
.narrative {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.narrative-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
}
.narrative-card h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.narrative-card p, .narrative-card ul {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
}
.narrative-card ul {
  list-style: none;
  padding-left: 0;
}
.narrative-card li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}
.narrative-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
}

/* Image Gallery */
.gallery {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}
.gallery-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.gallery-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gallery img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform 0.2s;
}
.gallery img:hover { transform: scale(1.01); }
.img-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Project Nav */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.project-nav a {
  font-weight: 600;
  color: var(--navy);
}
.project-nav a:hover { color: var(--gold); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .nav-inner { justify-content: center; }
  .hero { padding: 3rem 1.5rem; }
  .cert-badge { flex-direction: column; gap: 0.75rem; padding: 1rem; }
  .cert-divider { display: none; }
  section { padding: 2rem 1.5rem; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .gallery-2, .gallery-4 { grid-template-columns: 1fr; }
  .project-nav { flex-direction: column; gap: 1rem; text-align: center; }
}
