@import url("https://fonts.cdnfonts.com/css/electroharmonix");
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap");

/* variables */
:root {
  --red: #c0392b;
  --red-dark: #8b0000;
  --red-light: #e74c3c;
  --cream: #f5e6c8;
  --parchment: #ede0c4;
  --ink: #1a1008;
  --charcoal: #2c1810;
  --navy: #1a1f3a;
  --gold: #c9a84c;
  --muted: #6b5c4e;
  --max-width: 1280px;
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Crimson Text", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/*  nav bar css */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 9999;
  background: rgba(26, 8, 4, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--red);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: "Electroharmonix", sans-serif;
  font-size: 1.1rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 3px;
}
.site-logo span {
  color: var(--red-light);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.2rem;
}
.nav-menu a {
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2px;
  color: var(--cream);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  transition:
    color 0.25s,
    border-color 0.25s;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
}
.nav-menu a:hover {
  color: var(--red-light);
  border-color: var(--red-light);
}
.nav-menu a:visited {
  color: #d4a5a5;
}
.nav-menu a.active {
  color: var(--red-light);
  border-color: var(--red);
}

.hero {
  background-image: url(../images/samurai.png);
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.slider-wrap {
  position: absolute;
  inset: 0;
}
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
  padding: 2rem;
}
.slide.active {
  opacity: 1;
}
.slide-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: "Electroharmonix", sans-serif;
  font-size: clamp(2rem, 7vw, 5rem);
  color: var(--ink);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.hero-title .red {
  color: var(--red);
}
.hero-sub {
  font-family: "Electroharmonix", sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  color: var(--charcoal);
  letter-spacing: 3px;
  margin-bottom: 2rem;
}

/* typing animation (keep your existing effect) */
.typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--ink);
  width: 0;
  animation:
    typing 3s steps(20) forwards,
    blink 0.7s step-end 3,
    hideCursor 0s forwards 3s;
  display: inline-block;
}
.typing-2 {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid transparent;
  width: 0;
  display: inline-block;
  animation:
    typing 3s steps(20) forwards 3s,
    showCursor 0s forwards 3s,
    blink 0.7s step-end 3 3s,
    hideCursor 0s forwards 6s;
}
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes blink {
  50% {
    border-color: transparent;
  }
}
@keyframes showCursor {
  to {
    border-color: var(--ink);
  }
}
@keyframes hideCursor {
  to {
    border-color: transparent;
  }
}

.slider-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 10;
}
.s-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(26, 8, 4, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.s-dot.active {
  background: var(--red);
  transform: scale(1.4);
}
.s-btn {
  background: rgba(192, 57, 43, 0.25);
  border: 1px solid var(--red-dark);
  color: var(--ink);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
}
.s-btn:hover {
  background: rgba(192, 57, 43, 0.55);
}

/* buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s;
  border: none;
  text-transform: uppercase;
}
.btn-red {
  background: var(--red);
  color: var(--cream);
}
.btn-red:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
}
.btn-outline:hover {
  background: var(--red);
  color: var(--cream);
  transform: translateY(-2px);
}

.section {
  padding: 4rem 0;
}
.section-alt {
  background: rgba(26, 8, 4, 0.04);
}

.sec-label {
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 4px;
  color: var(--red);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}
.sec-title {
  font-family: "Electroharmonix", sans-serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.sec-title span {
  color: var(--red);
}
.sec-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  margin-bottom: 2.5rem;
}

/* grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}

/* status grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}
.stat-box {
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(245, 230, 200, 0.75);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: 4px;
}
.stat-num {
  font-family: sans-serif;
  font-size: 2rem;
  color: var(--red);
  display: block;
  margin-bottom: 0.3rem;
}
.stat-lbl {
  font-size: 0.82rem;
  color: var(--muted);
}

/* cards */
.card {
  background: rgba(245, 230, 200, 0.75);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: 4px;
  padding: 1.8rem;
  backdrop-filter: blur(6px);
  transition:
    border-color 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
}
.card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.15);
}

/* footer */
.site-footer {
  background: rgba(20, 6, 2, 0.95);
  border-top: 2px solid var(--red-dark);
  padding: 2.5rem 0 1.2rem;
  position: relative;
  z-index: 10;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.8rem;
}
.footer-col h4 {
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--red-light);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.footer-col p,
.footer-col a {
  font-size: 0.88rem;
  color: #c9b99a;
  text-decoration: none;
  display: block;
  margin-bottom: 0.35rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--red-light);
}
.footer-col a:visited {
  color: #a07878;
}
.footer-email {
  color: var(--gold) !important;
}

/* secondary text-only nav in footer  */
.footer-sec-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(192, 57, 43, 0.25);
  border-bottom: 1px solid rgba(192, 57, 43, 0.25);
  margin-bottom: 1rem;
}
.footer-sec-nav a {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-sec-nav a:hover {
  color: var(--red-light);
}
.footer-sec-nav a:visited {
  color: #8a6060;
}
.footer-sec-nav span {
  color: rgba(192, 57, 43, 0.35);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* inner page hero */
.page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 2.5rem;
  text-align: center;
}
.page-hero h1 {
  font-family: "Electroharmonix", sans-serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  color: var(--ink);
}
.page-hero h1 span {
  color: var(--red);
}
.page-hero p {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.breadcrumb a {
  color: var(--red-dark);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--red-light);
}

.page-bg {
  background-image: url(../images/samurai.png);
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

main > section:last-of-type {
  padding-bottom: 6rem;
}

/* skill bars */
.skill-label span:first-child {
  color: black;
  background-color: turquoise;
  border-radius: 50px;
  padding: 0 10px;
}
.skill-label span:last-child {
  color: var(--red-light);
}

.skill-row {
  margin-bottom: 1.1rem;
}
.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.skill-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
  height: 7px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-light));
  width: 0;
  transition: width 1.2s ease;
}

/* table */
.table-wrap {
  overflow-x: auto;
}
.dojo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.dojo-table caption {
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--red);
  text-transform: uppercase;
  padding: 0.6rem;
  text-align: left;
}
.dojo-table th {
  background: rgba(192, 57, 43, 0.15);
  color: var(--red-dark);
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  padding: 0.75rem 1rem;
  text-align: left;
  text-transform: uppercase;
  border-bottom: 2px solid var(--red-dark);
}
.dojo-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(192, 57, 43, 0.12);
  color: var(--charcoal);
}
.dojo-table tr:hover td {
  background: rgba(192, 57, 43, 0.06);
}
.dojo-table .merged-cell {
  background: rgba(192, 57, 43, 0.08);
  font-weight: 600;
  color: var(--red-dark);
  text-align: center;
  vertical-align: middle;
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.75rem;
}

.merged-cell {
  font-family: Arial, Helvetica, sans-serif !important;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
}
.badge-red {
  background: rgba(192, 57, 43, 0.15);
  color: var(--red-dark);
}
.badge-gold {
  background: rgba(201, 168, 76, 0.2);
  color: #7a6020;
}
.badge-navy {
  background: rgba(26, 31, 58, 0.12);
  color: var(--navy);
}

/* contact me form */
.form-group {
  margin-bottom: 1.3rem;
}
.form-group label {
  display: block;
  font-family: "Electroharmonix", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--red-dark);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(245, 230, 200, 0.6);
  border: 1.5px solid rgba(192, 57, 43, 0.3);
  border-radius: 3px;
  color: var(--ink);
  font-family: "Crimson Text", serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  background: rgba(245, 230, 200, 0.9);
}
.form-group textarea {
  resize: vertical;
  min-height: 130px;
}
.err {
  color: var(--red);
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: block;
}
#form-success {
  display: none;
  padding: 1.2rem;
  background: rgba(192, 57, 43, 0.08);
  border: 1.5px solid var(--red);
  border-radius: 4px;
  color: var(--red-dark);
  text-align: center;
  margin-top: 1rem;
  font-family: "Electroharmonix", sans-serif;
  letter-spacing: 2px;
  font-size: 0.85rem;
}

/* gallery  */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.thumb-wrap {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid rgba(192, 57, 43, 0.2);
  transition: all 0.3s;
  position: relative;
}
.thumb-wrap:hover {
  border-color: var(--red);
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.25);
}
.thumb-wrap img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.thumb-caption {
  background: rgba(26, 8, 4, 0.75);
  color: var(--cream);
  font-size: 0.78rem;
  padding: 0.4rem 0.6rem;
  text-align: center;
  font-family: "Electroharmonix", sans-serif;
  letter-spacing: 1px;
}

/* disable transitions during resize */
.no-transition nav,
.no-transition .nav-toggle span {
  transition: none !important;
}

/* hamburger button  */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 10001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* tablet */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* mobile */
@media (max-width: 768px) {
  /* hamburger visible */
  .nav-toggle {
    display: flex;
  }

  nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(20, 6, 2, 0.97);
    border-bottom: 2px solid var(--red);
    transform: translateY(-110%);
    visibility: hidden;
    transition:
      transform 0.35s ease,
      visibility 0s linear 0.35s;
    z-index: 9998;
  }
  nav.open {
    transform: translateY(0);
    visibility: visible;
    transition:
      transform 0.35s ease,
      visibility 0s linear 0s;
  }
  .nav-menu {
    flex-direction: column;
    padding: 1rem 0 1.5rem;
    gap: 0;
  }
  .nav-menu li {
    width: 100%;
  }
  .nav-menu a {
    display: block;
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    border-top: none !important;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid rgba(192, 57, 43, 0.12) !important;
  }
  .nav-menu a:hover,
  .nav-menu a.active {
    border-top: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(192, 57, 43, 0.12) !important;
    border-left: 3px solid var(--red) !important;
    padding-left: calc(2rem - 3px);
  }

  /* grids single column */
  .footer-grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* stats 2-col on mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2rem;
  }

  /* page-wrap padding tighter */
  .page-wrap {
    padding: 0 1.2rem;
  }

  /* section padding reduced */
  .section {
    padding: 2.5rem 0;
  }

  /* footer secondary nav wraps  */
  .footer-sec-nav {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* gallery smaller min */
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .thumb-caption {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dojo-table th,
  .dojo-table td {
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
  }

  .card {
    padding: 1.2rem;
  }
}
