:root {
  --bg: #020617;
  --bg-soft: #07111f;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(56, 189, 248, 0.34);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --emerald: #34d399;
  --violet: #a78bfa;
  --warning: #f59e0b;
  --danger: #fb7185;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(167, 139, 250, 0.13), transparent 28%),
    linear-gradient(145deg, #020617 0%, #08111f 42%, #0f172a 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 82%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 7%;
  background: rgba(2, 6, 23, 0.76);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
}

.brand,
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand {
  color: #f8fafc;
  font-weight: 900;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  color: #020617;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--sky));
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

nav a {
  padding: 8px 10px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

nav a:hover {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(56, 189, 248, 0.26);
}

.header-status {
  padding: 8px 10px;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12);
}

.server-badge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #dffcff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.server-badge.amazon .status-dot {
  background: var(--warning);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.13);
}

main {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.74) 22%, rgba(2, 6, 23, 0.96) 100%),
    linear-gradient(145deg, #020617 0%, #07111f 46%, #0f172a 100%);
}

.hero {
  position: relative;
  display: grid;
  min-height: 690px;
  padding: 96px 7% 82px;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.92)),
    url("assets/hero-infrastructure.png");
  background-position: center;
  background-size: cover;
  opacity: 0.58;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(56, 189, 248, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(110deg, rgba(0, 0, 0, 0.8), transparent 66%);
}

.hero-copy {
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: #f8fafc;
  font-size: 76px;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.hero-role {
  margin: 12px 0 0;
  color: var(--sky);
  font-size: 25px;
  font-weight: 900;
}

.hero-statement {
  max-width: 760px;
  margin: 28px 0 0;
  color: #f8fafc;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.45;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.secondary-action,
.ghost-action,
.search-box button,
.note-compose button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  font-weight: 900;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-action,
.search-box button,
.note-compose button {
  color: #03101a;
  background: linear-gradient(135deg, var(--cyan), var(--sky));
  border: 1px solid rgba(125, 211, 252, 0.72);
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

.secondary-action,
.ghost-action,
.search-box .secondary-button {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.ghost-action {
  color: var(--cyan);
}

.primary-action:hover,
.secondary-action:hover,
.ghost-action:hover,
.search-box button:hover,
.note-compose button:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
}

.hero-visual {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  width: min(100%, 1040px);
  margin-top: 46px;
}

.terminal-panel,
.hero-metrics,
.runtime-panel,
.project-card,
.skill-card,
.strength-card,
.note-card,
.note-compose,
.contact-section,
.loading,
.empty,
.error {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.terminal-panel {
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 13px 16px;
  background: rgba(2, 6, 23, 0.72);
  border-bottom: 1px solid var(--line);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.terminal-bar span:nth-child(2) {
  background: var(--warning);
}

.terminal-bar span:nth-child(3) {
  background: var(--emerald);
}

.terminal-panel pre {
  margin: 0;
  padding: 24px;
  color: #a7f3d0;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.terminal-panel code,
.config-snippet code {
  font-family: Consolas, "Courier New", monospace;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.hero-metrics div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.hero-metrics div:last-child {
  border-right: 0;
}

.hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-metrics strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.45;
}

.section-block {
  padding: 88px 7%;
  background: rgba(2, 6, 23, 0.88);
}

.section-block.muted {
  background: rgba(15, 23, 42, 0.74);
  border-block: 1px solid rgba(148, 163, 184, 0.1);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 34px;
}

.section-heading h2,
.contact-section h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 42px;
  line-height: 1.18;
}

.section-heading p:not(.eyebrow),
.contact-section p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted-strong);
}

.architecture-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.architecture-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
}

.architecture-flow::before {
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55), rgba(167, 139, 250, 0.42), transparent);
}

.flow-node {
  position: relative;
  min-height: 270px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition: transform 160ms ease, border-color 160ms ease;
}

.flow-node:hover,
.project-card:hover,
.skill-card:hover,
.strength-card:hover,
.note-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.node-index {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #02111c;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--sky));
  border-radius: var(--radius);
}

.flow-node h3,
.project-card h3,
.skill-card h3,
.strength-card h3,
.note-card h3,
.runtime-panel h3 {
  margin: 16px 0 0;
  color: #f8fafc;
  font-size: 21px;
  line-height: 1.35;
}

.flow-node p,
.project-card p,
.strength-card p,
.note-card p {
  margin: 12px 0 0;
  color: var(--muted-strong);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 18px;
  padding: 5px 9px;
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: var(--radius);
}

.status-badge.cyan {
  color: #cffafe;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.32);
}

.status-badge.emerald {
  color: #d1fae5;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.28);
}

.status-badge.violet {
  color: #ede9fe;
  background: rgba(167, 139, 250, 0.13);
  border-color: rgba(167, 139, 250, 0.3);
}

.status-badge.warning {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

.status-badge.neutral {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.24);
}

.runtime-panel {
  padding: 24px;
}

.panel-header h3 {
  margin-top: 0;
}

.status-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 22px 0 0;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.status-list div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(2, 6, 23, 0.38);
}

.status-list dt {
  color: #bfdbfe;
  font-weight: 900;
}

.status-list dd {
  margin: 0;
  color: var(--muted-strong);
}

.status-list .status-badge {
  margin-top: 0;
}

.config-snippet {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 16px;
  color: #a7f3d0;
  background: rgba(2, 6, 23, 0.54);
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: var(--radius);
}

.config-snippet span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.project-card {
  padding: 24px;
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.project-meta {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tag-row,
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin-top: 18px;
}

.tag-row span,
.note-tags span {
  padding: 6px 9px;
  color: #dffcff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius);
}

.project-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.project-notes strong {
  color: #f8fafc;
}

.project-notes p {
  margin-top: 6px;
  font-size: 14px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  min-height: 250px;
  padding: 22px;
}

.skill-card h3 {
  margin-top: 0;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 28px;
  align-items: start;
}

.strength-grid {
  display: grid;
  gap: 14px;
}

.strength-card {
  padding: 22px;
}

.strength-card span {
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
}

.strength-card h3 {
  margin-top: 8px;
}

.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 26px;
  align-items: start;
}

.search-box {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin: 0 0 28px;
}

.search-box input,
.note-compose input,
.note-compose textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 14px;
  color: #e5e7eb;
  background: rgba(2, 6, 23, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
}

.search-box input:focus,
.note-compose input:focus,
.note-compose textarea:focus {
  outline: 3px solid rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.52);
}

.search-box input::placeholder,
.note-compose input::placeholder,
.note-compose textarea::placeholder {
  color: #64748b;
}

.note-compose {
  padding: 18px;
}

.note-compose summary {
  color: #e0f2fe;
  font-weight: 900;
  cursor: pointer;
}

.note-compose form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.note-compose label {
  display: grid;
  gap: 6px;
}

.note-compose label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.note-compose textarea {
  resize: vertical;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form-message.success {
  color: var(--emerald);
}

.form-message.warning {
  color: var(--warning);
}

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

.note-card {
  padding: 22px;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.note-category {
  display: inline-flex;
  padding: 5px 8px;
  color: #cffafe;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius);
}

.note-tags {
  margin-top: 16px;
}

.loading,
.empty,
.error {
  grid-column: 1 / -1;
  padding: 18px;
  color: var(--muted-strong);
}

.error {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.32);
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 24px 7% 76px;
  padding: 28px;
}

footer {
  padding: 28px 7% 54px;
  color: var(--muted);
  text-align: center;
  background: rgba(2, 6, 23, 0.78);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

footer p {
  margin: 0;
}

@media (max-width: 1240px) {
  .architecture-flow,
  .skill-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .architecture-flow::before {
    display: none;
  }

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

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

  nav {
    justify-content: flex-start;
  }

  .architecture-layout,
  .about-layout,
  .notes-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 78px;
  }

  .hero-visual {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 56px;
  }

  .hero-role {
    font-size: 22px;
  }

  .hero-statement {
    font-size: 21px;
  }
}

@media (max-width: 780px) {
  .site-header,
  .hero,
  .section-block,
  footer {
    padding-left: 5%;
    padding-right: 5%;
  }

  .hero {
    gap: 30px;
    padding-top: 52px;
    padding-bottom: 54px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-role {
    font-size: 18px;
  }

  .hero-statement {
    font-size: 18px;
  }

  .section-heading h2,
  .contact-section h2 {
    font-size: 31px;
  }

  .architecture-flow,
  .project-grid,
  .project-notes,
  .skill-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .flow-node {
    min-height: auto;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-metrics div:last-child {
    border-bottom: 0;
  }

  .search-box,
  .hero-actions,
  .contact-section {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .secondary-action,
  .ghost-action,
  .search-box button {
    width: 100%;
  }

  .status-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .server-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand span:last-child {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  nav a,
  .header-status {
    font-size: 12px;
  }

  h1 {
    font-size: 36px;
  }

  .terminal-panel pre {
    padding: 18px;
    font-size: 12px;
  }
}
