:root {
  --bg: #060C08;
  --bg2: #0B1510;
  --bg3: #101E15;
  --green: #4ADE80;
  --amber: #F59E0B;
  --cream: #F5F0E8;
  --muted: #6B8070;
  --border: #1A2D1F;
  --card: #0E1A12;

  --font-heading: "Playfair Display", serif;
  --font-body: "DM Sans", sans-serif;

  --container: 1100px;
  --section-space: 110px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
  cursor: none;
}

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

a {
  text-decoration: none;
  color: var(--green);
}

ul {
  list-style: none;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.container {
  width: min(90%, var(--container));
  margin: 0 auto;
}

section {
  position: relative;
  padding: calc(var(--section-space) + 40px) 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--green);
  margin-bottom: 18px;
  font-weight: 500;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--green);
  flex-shrink: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--cream);
  line-height: 1.1;
  hyphens: none;
  word-break: normal;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
}

h3 {
  font-size: 1.4rem;
  font-weight: 600;
}

p {
  color: var(--muted);
  font-size: 1rem;
}

/* ── Custom Cursor ── */
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: background 0.2s;
}

#cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

#cursor-ring.hovered {
  width: 56px;
  height: 56px;
  border-color: var(--amber);
}

/* ── Buttons ── */
.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 2px;
  border: none;
  transition: var(--transition);
  cursor: none;
}

.btn-primary {
  background: var(--green);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.25);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--cream);
}

.btn-secondary:hover {
  border-color: var(--muted);
}

/* ── Nav ── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 60px;
  transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  padding: 18px 60px;
  background: rgba(6, 12, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--cream);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--green);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--cream);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  border: 1px solid var(--green);
  color: var(--green) !important;
  padding: 8px 22px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  border-radius: 2px;
  transition: background 0.3s ease, color 0.3s ease !important;
}

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

.nav-cta::after {
  display: none !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--cream);
  transition: var(--transition);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 950;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.nav-overlay.open {
  display: flex;
}

.nav-overlay a {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--cream);
  font-weight: 700;
  transition: color 0.3s;
}

.nav-overlay a:hover {
  color: var(--green);
}

.nav-overlay-close {
  position: absolute;
  top: 28px;
  right: 60px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2rem;
  cursor: none;
  line-height: 1;
  transition: color 0.3s;
}

.nav-overlay-close:hover {
  color: var(--cream);
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: visible;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 10px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--muted);
  margin: 16px 0 20px;
  font-style: italic;
}

.hero-description {
  max-width: 520px;
  margin-bottom: 36px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-photo-frame {
  position: relative;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  overflow: visible;
}

.hero-photo {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

/* Section dividers removed — replaced by gradient fade bridges below */

/* ── About ── */
.about {
  background: var(--bg2);
}

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

/* ── Credentials ── */
.credentials {
  background: var(--bg);
  padding-top: 20px;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.credential-item {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--card);
  transition: border-color 0.3s ease;
}

.credential-item:hover {
  border-color: var(--muted);
}

.credential-item h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

/* ── Services ── */
.services {
  background: var(--bg3);
  border-top: 1px solid var(--border);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

.services-grid,
.work-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

/* ── Cards ── */
.card,
.project-card,
.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 30px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover,
.project-card:hover,
.skill-group:hover {
  border-color: var(--muted);
  transform: translateY(-4px);
}

.card h3,
.skill-group h3 {
  margin-bottom: 14px;
  color: var(--cream);
}

/* ── Work / Projects ── */
.work {
  background: var(--bg2);
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.project-image {
  min-height: 220px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  background: var(--bg3);
}

.project-image-media {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.55s ease;
}

.project-card:hover .project-image-media {
  transform: scale(1.05);
}

.project-image-1 {
  background-image: url("images/project-1.webp");
  background-position: center center;
}
.project-image-2 {
  background-image: url("images/project-2.webp");
  background-position: center 30%;
}
.project-image-3 {
  background-image: url("images/project-3.webp");
  background-position: center center;
}
.project-image-4 {
  background-image: url("images/project-4.webp");
  background-position: center center;
}

.project-category {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-link {
  margin-top: auto;
  padding-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
  width: fit-content;
}

.project-card:hover .project-link {
  color: var(--green);
  border-color: var(--green);
}

/* ── Skills ── */
.skills {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.skill-group ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.skill-group li {
  color: var(--muted);
  font-size: 0.97rem;
  position: relative;
  padding-left: 18px;
}

.skill-group li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 0.8rem;
  line-height: 1.8;
}

/* ── Values ── */
.values {
  background: var(--bg3);
}

.values-box {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 56px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 2px;
}

.values-box h2 {
  margin: 16px 0 20px;
}

.values-box .section-label {
  justify-content: center;
}

.values-box .section-label::before {
  display: none;
}

/* ── Contact ── */
.contact {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 60px;
  align-items: start;
}

.contact-actions {
  margin-top: 28px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-details p {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.97rem;
}

.contact-details p strong {
  color: var(--cream);
  font-weight: 500;
}

.contact-details a {
  color: var(--muted);
  transition: color 0.3s;
}

.contact-details a:hover {
  color: var(--green);
}

/* ── Footer ── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 36px 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--green);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ── PROJECT PAGES ── */

.project-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 60px;
  transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.project-header.scrolled {
  padding: 18px 60px;
  background: rgba(6, 12, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.project-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

.back-link {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--green);
}

.project-hero {
  padding: 160px 0 90px;
  background: var(--bg);
}

.project-hero-grid,
.project-two-column {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.project-summary {
  max-width: 580px;
  font-size: 1.05rem;
  margin-top: 20px;
  line-height: 1.8;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.project-meta div {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--card);
}

.meta-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green);
  font-weight: 500;
}

.project-meta p {
  color: var(--cream);
  font-size: 0.95rem;
}

.project-hero-frame {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
}

.project-hero-image {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.project-section {
  padding: 130px 0;
  background: var(--bg);
}

.project-section:nth-child(even) {
  background: var(--bg2);
}

.project-soft {
  background: var(--bg3) !important;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.project-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.focus-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--card);
  transition: border-color 0.3s ease;
}

.focus-card:hover {
  border-color: var(--muted);
}

.focus-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.evidence-card {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--card);
}

.evidence-card img,
.evidence-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.evidence-card figcaption {
  padding: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-cta {
  padding: 130px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.project-cta-box {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--card);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.project-cta-box h2 {
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

/* ── CAN VIDEO ── */

.project-hero-image-can {
  object-position: center 30%;
}

.video-feature-card {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--card);
}

.feature-video {
  width: 100%;
  display: block;
  background: #000;
  max-height: 620px;
}

.video-caption {
  margin-top: 18px;
  max-width: 760px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.highlight-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--card);
  transition: border-color 0.3s ease;
}

.highlight-card:hover {
  border-color: var(--muted);
}

.highlight-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

/* ── Object positions ── */

.project-hero-image-mknf { object-position: center center; }
.project-hero-image-portfolio { object-position: center top; }
.evidence-image-2 { object-position: center 35%; }
.evidence-image-mknf-2 { object-position: center 35%; }
.evidence-image-mknf-3 { object-position: center center; }
.evidence-image-portfolio-1 { object-position: center top; }
.evidence-image-portfolio-2 { object-position: center top; }
.evidence-image-portfolio-3 { object-position: center top; }

/* ── Mobile ── */
@media (max-width: 900px) {
  #nav,
  .project-header {
    padding: 20px 24px;
  }

  #nav.scrolled,
  .project-header.scrolled {
    padding: 14px 24px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .site-footer {
    padding: 36px 24px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 100px;
    min-height: 110vh;
  }

  .hero-photo {
    height: 380px;
  }

  .services-grid,
  .work-grid,
  .skills-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 72px 0;
  }

  .project-hero {
    padding: 130px 0 72px;
  }

  .project-hero-grid,
  .project-two-column,
  .project-focus-grid,
  .evidence-grid,
  .project-meta,
  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .project-hero-image {
    height: 340px;
  }

  .project-cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
  }

  .values-box {
    padding: 36px 24px;
  }

  .nav-overlay-close {
    right: 24px;
  }
}

/* ══════════════════════════════════════
   SECTION FADE BRIDGES
   Each section bleeds into the next via
   gradient ::before / ::after overlays.
══════════════════════════════════════ */

/* Default fade: transparent → #060C08 */
section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #060C08);
  pointer-events: none;
  z-index: 10;
}

/* Default fade-in: #060C08 → transparent */
section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, #060C08, transparent);
  pointer-events: none;
  z-index: 10;
}

/* Utility direction classes */
.fade-to-bg1::after   { background: linear-gradient(to bottom, transparent, #060C08); }
.fade-to-bg2::after   { background: linear-gradient(to bottom, transparent, #0B1510); }
.fade-to-bg3::after   { background: linear-gradient(to bottom, transparent, #101E15); }
.fade-from-bg1::before { background: linear-gradient(to bottom, #060C08, transparent); }
.fade-from-bg2::before { background: linear-gradient(to bottom, #0B1510, transparent); }
.fade-from-bg3::before { background: linear-gradient(to bottom, #101E15, transparent); }
.no-fade-top::before   { display: none; }
.no-fade-bottom::after { display: none; }

/* Lift all section content above the fade overlays (z-index 10) */
section > .container {
  position: relative;
  z-index: 20;
}

/* ── index.html named section overrides ── */

.hero::before     { display: none; }
.hero::after      { background: linear-gradient(to bottom, transparent, #0B1510); }

/* about: bg #0B1510, prev #060C08, next #060C08 — defaults are correct */

.credentials::before { background: linear-gradient(to bottom, #0B1510, transparent); }
.credentials::after  { background: linear-gradient(to bottom, transparent, #101E15); }

/* services: bg #101E15, prev #060C08 (default ok), next #0B1510 */
.services::after  { background: linear-gradient(to bottom, transparent, #0B1510); }

/* work: bg #0B1510, prev #101E15, next #060C08 (default ok) */
.work::before     { background: linear-gradient(to bottom, #101E15, transparent); }

/* skills: bg #060C08, prev #0B1510, next #101E15 */
.skills::before   { background: linear-gradient(to bottom, #0B1510, transparent); }
.skills::after    { background: linear-gradient(to bottom, transparent, #101E15); }

/* values: bg #101E15, prev #060C08 (default ok), next #0B1510 */
.values::after    { background: linear-gradient(to bottom, transparent, #0B1510); }

/* contact: bg #0B1510, prev #101E15, footer same bg — no bottom fade */
.contact::before  { background: linear-gradient(to bottom, #101E15, transparent); }
.contact::after   { display: none; }

/* ── Project page fades ── */

.page-banner::before { display: none; }
.page-banner::after  { background: linear-gradient(to bottom, transparent, #060C08); }

.project-hero::before { display: none; }
.project-hero::after  { background: linear-gradient(to bottom, transparent, #060C08); }

/* project-soft (bg3): surrounded by bg1 sections */
.project-soft::before { background: linear-gradient(to bottom, #060C08, transparent); }
.project-soft::after  { background: linear-gradient(to bottom, transparent, #060C08); }

.project-cta::before  { background: linear-gradient(to bottom, #060C08, transparent); }
.project-cta::after   { display: none; }

/* Credentials padding override (was set to padding-top: 20px — preserve that intent) */
.credentials {
  padding-top: 60px;
}
