:root {
  --bg: #080908;
  --surface: rgba(17, 19, 20, 0.78);
  --surface-strong: #111314;
  --surface-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(244, 240, 232, 0.13);
  --line-strong: rgba(244, 240, 232, 0.22);
  --text: #f4f0e8;
  --muted: #aeb8af;
  --faint: #717b72;
  --teal: #5eead4;
  --amber: #f7c66a;
  --rose: #ff7a90;
  --green: #a3e635;
  --violet: #b89cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.08), transparent 28%),
    linear-gradient(225deg, rgba(247, 198, 106, 0.08), transparent 36%),
    #080908;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(244, 240, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 240, 232, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #080908;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.boot-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.boot-panel {
  width: min(520px, 100%);
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(17, 19, 20, 0.92);
  box-shadow: var(--shadow);
}

.boot-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(94, 234, 212, 0.45);
}

.boot-top {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.86rem;
}

.boot-log {
  margin-top: 28px;
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

.boot-line {
  margin: 10px 0;
  opacity: 0;
  transform: translateY(6px);
  animation: lineIn 420ms ease forwards;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  padding: 12px 0;
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.header-action {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--teal);
  background: rgba(255, 255, 255, 0.06);
}

.brand-mark img {
  width: 24px;
  height: 24px;
}

.nav-links {
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 9, 8, 0.46);
}

.nav-links a,
.header-action {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: background 180ms ease, color 180ms ease;
}

.nav-links a:hover,
.header-action:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.header-action {
  border: 1px solid var(--line);
  background: rgba(8, 9, 8, 0.46);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 68px));
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.96), rgba(8, 9, 8, 0.63) 46%, rgba(8, 9, 8, 0.2)),
    linear-gradient(0deg, #080908 0%, rgba(8, 9, 8, 0) 34%);
}

.hero-content {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  position: relative;
  z-index: 10;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(4rem, 14vw, 10rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 28px;
  color: #dce4dc;
  font-size: clamp(1.03rem, 2vw, 1.25rem);
}

.strawhat-banner {
  width: min(620px, 100%);
  margin: 0 0 20px;
  overflow: hidden;
  border: 1px solid rgba(247, 198, 106, 0.24);
  border-radius: var(--radius);
  background: rgba(17, 19, 20, 0.48);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.strawhat-banner img {
  width: 100%;
  height: clamp(120px, 20vw, 180px);
  object-fit: cover;
}

.hero-actions,
.contact-actions,
.whiteboard-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.contact-link,
.tool-button,
.project-file {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, color 180ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-weight: 700;
}

.button:hover,
.contact-link:hover,
.tool-button:hover,
.project-file:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.button-primary {
  color: #08110f;
  background: var(--teal);
  border-color: transparent;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.08);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 10px;
  max-width: 500px;
  margin-top: 42px;
}

.hero-metrics div,
.terminal-panel,
.project-shell,
.skill-track,
.about-panel,
.whiteboard-wrap,
.contact-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-metrics div {
  padding: 14px;
}

.hero-metrics strong {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
}

.hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Hero Modern Details */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.82rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}

.text-teal {
  color: var(--teal);
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.stack-item {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  color: var(--teal);
  padding: 6px 12px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 6px;
  background: rgba(94, 234, 212, 0.05);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.stack-item:hover {
  background: rgba(94, 234, 212, 0.15);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.metric-card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 240, 232, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge { animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
#hero-title { animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.hero-copy { animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }
.hero-stack { animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.hero-actions { animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both; }
.hero-metrics { animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both; }

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0;
}

.dashboard-grid {
  display: block;
}

.terminal-panel,
.project-shell,
.whiteboard-wrap,
.contact-section {
  padding: 20px;
}

.panel-heading h2,
.section-heading h2,
.contact-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(1.85rem, 4vw, 3.2rem);
  line-height: 1;
}

.section-heading p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.terminal-window {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  padding: 18px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: var(--radius);
  background: rgba(3, 5, 5, 0.72);
  overflow: hidden;
}

.terminal-output {
  flex: 1;
  overflow: auto;
  padding-right: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.terminal-line {
  margin: 0 0 10px;
  color: #d7ded5;
  white-space: pre-wrap;
}

.terminal-line.command {
  color: var(--teal);
}

.terminal-line.error {
  color: var(--rose);
}

.terminal-input-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.terminal-input-row input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.project-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 26px;
  padding: 14px;
}

.project-tree {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.project-file {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  min-height: 126px;
  padding: 14px;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}

.project-file.is-active {
  color: var(--text);
  background: rgba(94, 234, 212, 0.09);
  border-color: rgba(94, 234, 212, 0.32);
}

.file-icon {
  width: 16px;
  height: 12px;
  margin-top: 4px;
  border: 1px solid currentColor;
  border-radius: 3px;
  opacity: 0.78;
}

.project-file-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-file-copy strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.16;
}

.project-file-copy small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.project-detail {
  min-height: 420px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.project-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.project-category {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.project-detail h3 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.project-detail p {
  max-width: 760px;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.project-tags span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(94, 234, 212, 0.32);
  border-radius: var(--radius);
  color: var(--teal);
  background: rgba(94, 234, 212, 0.08);
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.project-link:hover {
  border-color: rgba(94, 234, 212, 0.62);
  background: rgba(94, 234, 212, 0.14);
  transform: translateY(-1px);
}

.project-link-muted {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.project-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.project-snapshot div {
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 9, 8, 0.34);
}

.project-snapshot span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.project-snapshot strong {
  display: block;
  color: var(--text);
  line-height: 1.15;
}

.project-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-column {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.project-column h4 {
  margin: 0 0 8px;
  color: var(--amber);
}

.project-column ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.skill-track {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.skill-track::before {
  position: absolute;
  top: 73px;
  left: 34px;
  width: 1px;
  height: calc(100% - 104px);
  content: "";
  background: linear-gradient(var(--teal), transparent);
}

.skill-track h3 {
  margin-bottom: 20px;
  font-size: 1rem;
}

.skill-nodes {
  display: grid;
  gap: 12px;
}

.skill-node {
  position: relative;
  z-index: 1;
  min-height: 42px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #111314;
}

.skill-node::before {
  position: absolute;
  top: 50%;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  content: "";
  background: var(--surface-strong);
  transform: translateY(-50%);
}

.skill-node.is-unlocked {
  color: var(--text);
  border-color: rgba(163, 230, 53, 0.3);
  background: rgba(163, 230, 53, 0.08);
}

.skill-node.is-unlocked::before {
  background: var(--green);
  box-shadow: 0 0 18px rgba(163, 230, 53, 0.35);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.bio-panel {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.bio-panel p {
  margin: 0;
  color: #dce4dc;
}

.about-panel {
  padding: 18px;
}

.about-panel span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.about-panel strong {
  display: block;
  font-size: 1rem;
}

.whiteboard-wrap {
  margin-top: 26px;
}

.whiteboard-tools {
  align-items: center;
  margin-bottom: 12px;
}

.tool-button {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
}

.tool-button.is-active {
  color: #08110f;
  background: var(--teal);
  border-color: transparent;
}

.size-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.size-control input {
  accent-color: var(--teal);
}

.swatches {
  display: flex;
  gap: 8px;
}

.swatch {
  width: 34px;
  height: 34px;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  background: var(--swatch);
}

.swatch.is-active {
  border-color: var(--text);
}

#whiteboard {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 620;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(244, 240, 232, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 240, 232, 0.04) 1px, transparent 1px),
    #0d0f10;
  background-size: 28px 28px;
  touch-action: none;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 80px;
}

.contact-copy p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-actions {
  justify-content: flex-end;
}

.contact-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
}

.contact-link span,
.contact-link small {
  display: block;
  max-width: 100%;
}

.contact-link span {
  font-weight: 750;
}

.contact-link small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100% - 32px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid rgba(247, 198, 106, 0.3);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(17, 19, 20, 0.94);
  box-shadow: var(--shadow);
  animation: toastIn 260ms ease forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes lineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: stretch;
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    /* Centered natively by flex now */
  }

  .project-shell,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .project-tree {
    grid-template-columns: 1fr;
  }

  .project-file {
    min-height: 0;
  }

  .project-detail-top {
    grid-template-columns: 1fr;
  }

  .project-actions {
    justify-content: flex-start;
  }

  .skill-grid,
  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-content {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .hero-metrics,
  .project-columns,
  .project-snapshot,
  .project-tree,
  .skill-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .terminal-window {
    min-height: 380px;
  }

  .section {
    padding: 58px 0;
  }

  .contact-link {
    flex: 1 1 46%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
