:root {
  --bg: #020202;
  --panel: #0c0c0c;
  --text: #f6f6f6;
  --muted: #bbbbbb;
  --orange: #ff7a18;
  --green: #1f7a4a;
  --line: #1e1e1e;
}

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

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  scroll-behavior: smooth;
  background: var(--bg);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.page-wrap {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

#home {
  flex-shrink: 0;
}

.noise-layer,
.leaf-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.noise-layer {
  opacity: 0.1;
  background-image: radial-gradient(circle at 20% 20%, #ffffff22 0.8px, transparent 0.8px),
    radial-gradient(circle at 80% 70%, #ffffff1a 0.8px, transparent 0.8px);
  background-size: 3px 3px, 4px 4px;
}

.leaf-layer {
  z-index: -1;
  opacity: 0.2;
  background:
    radial-gradient(1200px 500px at 95% 0%, #1f7a4a33 0%, transparent 70%),
    radial-gradient(900px 600px at 0% 100%, #1f7a4a22 0%, transparent 70%),
    repeating-radial-gradient(circle at 75% 30%, #1f7a4a18 0 1.2px, transparent 1.2px 26px);
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: min(1080px, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 1.25rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border: 0;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand span {
  color: var(--orange);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem 0.95rem;
  max-width: min(720px, 100%);
}

.site-nav > a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}

.site-nav > a:hover {
  color: var(--text);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.65rem 0.32rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.35);
  background: rgba(255, 122, 24, 0.06);
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-dropdown__summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown__summary::marker {
  content: "";
}

/* Down-chevron: reads clearly as “has submenu” */
.nav-dropdown__summary::after {
  content: "";
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--orange);
  opacity: 0.95;
  transition: transform 0.2s ease;
  transform-origin: 50% 35%;
}

.nav-dropdown[open] > .nav-dropdown__summary {
  color: var(--text);
  border-color: rgba(255, 122, 24, 0.55);
  background: rgba(255, 122, 24, 0.1);
}

.nav-dropdown[open] > .nav-dropdown__summary::after {
  transform: rotate(180deg);
}

.nav-dropdown__summary:hover {
  color: var(--text);
  border-color: rgba(255, 122, 24, 0.5);
  background: rgba(255, 122, 24, 0.09);
}

.nav-dropdown__summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.nav-dropdown__panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 200;
  min-width: 11.5rem;
  padding: 0.35rem 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #121212fa, #0a0a0af5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}

.nav-dropdown__panel a {
  display: block;
  padding: 0.45rem 0.95rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-dropdown__panel a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* Section flash after in-page navigation (see script.js) */
@keyframes section-flash {
  0% {
    box-shadow: inset 0 0 0 0 rgba(255, 122, 24, 0), 0 0 0 0 rgba(255, 122, 24, 0);
  }
  14% {
    box-shadow: inset 0 0 0 2px var(--orange), 0 0 0 1px rgba(255, 122, 24, 0.35),
      0 0 36px rgba(255, 122, 24, 0.25);
  }
  42% {
    box-shadow: inset 0 0 0 2px rgba(255, 122, 24, 0.85), 0 0 0 1px rgba(255, 122, 24, 0.25),
      0 0 28px rgba(255, 122, 24, 0.18);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(255, 122, 24, 0), 0 0 0 0 rgba(255, 122, 24, 0);
  }
}

.section-flash {
  animation: section-flash 2.35s cubic-bezier(0.33, 0.9, 0.35, 1) 1s forwards;
  border-radius: 18px;
  position: relative;
  z-index: 3;
}

#home.section-flash {
  border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  .section-flash {
    animation-duration: 1.0s;
    animation-delay: 0.5s;
    animation-timing-function: ease-out;
  }

  @keyframes section-flash {
    0% {
      box-shadow: inset 0 0 0 0 rgba(255, 122, 24, 0);
    }
    40% {
      box-shadow: inset 0 0 0 2px var(--orange);
    }
    100% {
      box-shadow: inset 0 0 0 0 rgba(255, 122, 24, 0);
    }
  }
}

main {
  flex: 1 1 auto;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.2rem 2rem;
  position: relative;
  z-index: 1;
}

.forest-echoes {
  position: absolute;
  top: 100vh;
  left: 0;
  width: 100%;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.forest-echo {
  position: absolute;
  width: 140vw;
  max-width: none;
  transform-origin: center center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 78%, transparent 100%);
}

.forest-echo svg {
  display: block;
  width: 100%;
  height: auto;
}

.forest-echo-1 {
  top: 120px;
  left: -20vw;
  transform: scaleX(-1) scaleY(-1) rotate(4deg);
  opacity: 0.75;
}

.forest-echo-2 {
  top: 1100px;
  left: -10vw;
  transform: rotate(178deg) scaleX(-1) scale(1.15);
  opacity: 0.6;
}

.forest-echo-3 {
  top: 2100px;
  left: -25vw;
  transform: scaleY(-1) rotate(-6deg) scale(1.2);
  opacity: 0.5;
}

.forest-echo-4 {
  top: 3100px;
  left: -8vw;
  transform: rotate(175deg) scale(1.3);
  opacity: 0.4;
}

.fireflies-layer {
  position: absolute;
  top: 100vh;
  left: 0;
  width: 100%;
  height: max(2600px, 280vh);
  pointer-events: none;
  z-index: 2;
}

.ff {
  position: absolute;
  border-radius: 50%;
  background: var(--ff-color);
  box-shadow: 0 0 6px 2px var(--ff-glow), 0 0 14px 4px var(--ff-glow);
  animation: ffPulse ease-in-out infinite alternate;
}

@keyframes ffPulse {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
  30%  { opacity: 0.9; }
  50%  { opacity: 1; transform: translate(6px, -10px) scale(1); }
  70%  { opacity: 0.7; }
  100% { opacity: 0; transform: translate(-4px, -18px) scale(0.5); }
}



/* Kodama hero (from original pen) */
.horizontal-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.transparent {
  opacity: 0;
}

#header {
  height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

#kodama-graphic {
  height: 100%;
  opacity: 0;
}

.eyebrow {
  color: var(--orange);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.12;
  max-width: 14ch;
}

.intro {
  color: var(--muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  text-decoration: none;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--orange);
  color: #121212;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.panel {
  background: linear-gradient(180deg, #0b0b0bdd, #090909dd);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem;
  margin-top: 1.2rem;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 0.65rem;
}

.panel p {
  color: var(--muted);
  margin-top: 0.45rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.profile-frame {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  min-height: 240px;
  background: #070707;
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.05);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.chips span {
  border: 1px solid #2b2b2b;
  background: #101010;
  color: #d6d6d6;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.84rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: #0a0a0a;
  position: relative;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.card-heading h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.card-heading .card-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  opacity: 0.95;
  filter: saturate(1.05) contrast(1.02);
}

.meta {
  color: #9e9e9e !important;
  font-size: 0.84rem;
  margin-top: 0;
}

.stack {
  grid-template-columns: 1fr;
}

.card a {
  color: var(--orange);
  text-decoration: none;
  display: inline-block;
  margin-top: 0.55rem;
}

.tag {
  display: inline-block;
  margin-top: 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.2rem 0.58rem;
  border: 1px solid #243327;
  color: #a6d8b8;
  background: #152019;
}

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.col-main,
.col-side {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.two-col .panel {
  margin-top: 0;
}

/* Resume panel */
.resume-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.resume-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a1a1a, #111);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  margin-bottom: 0.2rem;
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
  font-size: 0.92rem;
}

.profile-panel .profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-top: 0.55rem;
}

.profile-sub h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.profile-sub p {
  margin: 0;
  font-size: 0.95rem;
}

.profile-sub-wide {
  grid-column: 1 / -1;
}

.profile-sub a {
  color: var(--orange);
  text-decoration: none;
}

.profile-sub a:hover {
  text-decoration: underline;
}

.cert-intro {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  max-width: 65ch;
}

.cert-placeholder-cards .cert-card-title {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.learning-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.learning-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #0a0a0a;
  color: var(--muted);
}

.learning-list a {
  color: var(--orange);
  text-decoration: none;
}

.learning-list a:hover {
  text-decoration: underline;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.7rem;
}

.contact-links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid #ffffff40;
}

.footer-jungle-wrap {
  position: relative;
  z-index: 0;
  width: 100%;
  flex-shrink: 0;
  margin-top: -4rem;
  padding-top: 4rem;
}

#footer-jungle {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.footer-jungle-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 360px;
}

footer {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 1.2rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-brand .brand {
  font-size: 1.15rem;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 30ch;
  line-height: 1.55;
}

.footer-col h4 {
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.65rem;
  opacity: 0.7;
}

.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.2rem 0;
  transition: color 120ms ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.15rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 120ms ease, border-color 120ms ease;
  padding: 0;
}

.footer-social a:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  color: #5a5a5a;
  font-size: 0.8rem;
}

.footer-bottom .footer-tech {
  color: #444;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .forest-echo {
    width: 200vw;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
    max-width: none;
  }

  .nav-dropdown__panel {
    right: auto;
    left: 0;
  }

  .card-heading .card-logo {
    width: 38px;
    height: 38px;
  }

  .profile-panel .profile-grid {
    grid-template-columns: 1fr;
  }
}
