:root {
  --bg: #0a1116;
  --bg2: #111922;
  --surface: rgba(18, 26, 33, 0.92);
  --surface2: #17222c;
  --border: rgba(151, 190, 181, 0.1);
  --border-hover: rgba(88, 215, 255, 0.24);
  --text: #e9f0ec;
  --muted: #94a59f;
  --mint: #7bf0be;
  --cyan: #58d7ff;
  --amber: #ffbc72;
  --rose: #ff8392;
  --nav-h: 64px;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.35);
  --nav-accent: var(--mint);
  --radius: 20px;
  --radius-sm: 14px;
}

body {
  background:
    radial-gradient(
      ellipse 80% 60% at 10% 8%,
      rgba(88, 215, 255, 0.07),
      transparent
    ),
    radial-gradient(
      ellipse 60% 50% at 88% 14%,
      rgba(123, 240, 190, 0.06),
      transparent
    ),
    radial-gradient(
      ellipse 70% 40% at 50% 100%,
      rgba(255, 188, 114, 0.05),
      transparent
    ),
    linear-gradient(180deg, #081016 0%, #0b141c 50%, #081015 100%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

.nav-brand .mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 0 18px rgba(123, 240, 190, 0.35);
}

/* ─── Hamburger ────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 72px) 32px 56px;
}

.hero-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.timeline-card,
.skill-card,
.link-card,
.contact-panel,
.contact-form {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.32s ease,
    box-shadow 0.32s ease,
    background 0.32s ease;
}

.hero-copy::before,
.hero-panel::before,
.card::before,
.timeline-card::before,
.skill-card::before,
.link-card::before,
.contact-panel::before,
.contact-form::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 5%,
    rgba(88, 215, 255, 0.5) 30%,
    rgba(123, 240, 190, 0.4) 70%,
    transparent 95%
  );
  opacity: 0.7;
}

.hero-copy {
  padding: 36px 32px;
  background:
    radial-gradient(
      ellipse 60% 50% at 0% 0%,
      rgba(123, 240, 190, 0.1),
      transparent
    ),
    linear-gradient(180deg, rgba(20, 31, 39, 0.97), rgba(10, 17, 23, 0.97));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(123, 240, 190, 0.07);
  border: 1px solid rgba(123, 240, 190, 0.16);
  color: var(--mint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  font-weight: 800;
}

h1 span {
  background: linear-gradient(
    135deg,
    var(--mint),
    var(--cyan) 56%,
    var(--amber)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 20px;
  max-width: 640px;
  line-height: 1.8;
}

.hero-note {
  position: relative;
  padding: 16px 18px 16px 24px;
  border-radius: var(--radius-sm);
  background: rgba(255, 188, 114, 0.05);
  border: 1px solid rgba(255, 188, 114, 0.14);
  color: #d7e4de;
  margin-bottom: 22px;
  font-size: 0.94rem;
  line-height: 1.75;
}

.hero-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), var(--mint));
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #041016;
  box-shadow: 0 6px 20px rgba(88, 215, 255, 0.18);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(151, 190, 181, 0.15);
  color: var(--muted);
}

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

.btn-primary:hover {
  box-shadow: 0 12px 36px rgba(88, 215, 255, 0.28);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(88, 215, 255, 0.06);
  color: var(--text);
}

.hero-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background:
    radial-gradient(
      ellipse 70% 50% at 80% 10%,
      rgba(88, 215, 255, 0.06),
      transparent
    ),
    linear-gradient(180deg, rgba(23, 34, 44, 0.97), rgba(12, 19, 25, 0.97));
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.signal {
  position: relative;
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}

.signal:hover {
  border-color: rgba(88, 215, 255, 0.15);
  background: rgba(88, 215, 255, 0.03);
}

.signal::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(123, 240, 190, 0),
    rgba(123, 240, 190, 0.28),
    rgba(88, 215, 255, 0)
  );
}

.signal .k {
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.signal .v {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 100px;
}

section {
  padding-top: 40px;
}

section + section {
  margin-top: 16px;
  padding-top: 48px;
  border-top: 1px solid rgba(151, 190, 181, 0.06);
}

.section-label {
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-sub {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 28px;
  font-size: 0.95rem;
  line-height: 1.8;
}

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

.card,
.skill-card,
.link-card {
  padding: 22px;
}

.card:hover,
.timeline-card:hover,
.skill-card:hover,
.link-card:hover,
.contact-panel:hover,
.contact-form:hover,
.hero-panel:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.card h3,
.skill-card h3,
.timeline-card h3,
.link-card h3 {
  font-size: 1.02rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.card p,
.skill-card p,
.timeline-card p,
.link-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.72;
}

.tiny {
  font-size: 0.72rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
  padding-left: 28px;
}

.time-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(123, 240, 190, 0.14);
  background: rgba(123, 240, 190, 0.06);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--mint);
  font-weight: 600;
  white-space: nowrap;
}

.timeline-copy h3 {
  margin-bottom: 10px;
}

.timeline-copy ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-copy li {
  color: #d8e3de;
  font-size: 0.88rem;
  position: relative;
  padding-left: 16px;
  line-height: 1.65;
}

.timeline-copy li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 6px rgba(123, 240, 190, 0.4);
  position: absolute;
  left: 0;
  top: 0.7em;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  padding: 5px 10px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(88, 215, 255, 0.08),
    rgba(123, 240, 190, 0.04)
  );
  border: 1px solid rgba(88, 215, 255, 0.14);
  color: #b8e0ea;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.tag:hover {
  border-color: rgba(88, 215, 255, 0.3);
  background: rgba(88, 215, 255, 0.1);
}

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

.link-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  text-decoration: none;
  color: var(--mint);
  font-weight: 700;
  font-size: 0.9rem;
  transition: gap 0.2s ease;
}

.link-card a::after {
  content: "→";
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.link-card:hover a::after {
  transform: translateX(5px);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.contact-panel,
.contact-form {
  padding: 28px;
  background: linear-gradient(
    180deg,
    rgba(18, 26, 33, 0.97),
    rgba(9, 15, 20, 0.97)
  );
}

.contact-panel p {
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.75;
}

.inline-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.metric-mini {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.metric-mini:hover {
  border-color: rgba(88, 215, 255, 0.16);
}

.metric-mini .k {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.metric-mini .v {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.contact-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(151, 190, 181, 0.12);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.db-multi-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.db-summary {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 4px;
}

.db-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(151, 190, 181, 0.05);
  border: 1px solid var(--border);
}

.db-row--ok {
  border-color: rgba(123, 240, 190, 0.25);
}

.db-row--fail {
  border-color: rgba(255, 131, 146, 0.25);
}

.db-row--empty {
  color: var(--muted);
  font-style: italic;
}

.db-label {
  font-weight: 700;
  color: var(--text);
  min-width: 90px;
  text-transform: uppercase;
}

.db-host {
  color: var(--muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-status {
  white-space: nowrap;
}

.db-row--ok .db-status {
  color: var(--mint);
}

.db-row--fail .db-status {
  color: var(--rose);
}

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

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.82rem;
  color: #d2e6dd;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(88, 215, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(88, 215, 255, 0.1);
}

.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.form-status[data-state="success"] {
  border-color: rgba(123, 240, 190, 0.32);
  background: rgba(123, 240, 190, 0.08);
  color: #d2f3e3;
}

.form-status[data-state="warning"] {
  border-color: rgba(255, 188, 114, 0.32);
  background: rgba(255, 188, 114, 0.08);
  color: #ffe4c6;
}

.form-status[data-state="error"] {
  border-color: rgba(255, 131, 146, 0.32);
  background: rgba(255, 131, 146, 0.08);
  color: #ffd4da;
}

.contact-form .btn {
  margin-top: 4px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

footer {
  max-width: 1200px;
  margin: 36px auto 0;
  padding: 28px 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid rgba(151, 190, 181, 0.06);
  font-size: 0.88rem;
}

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

.footer-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

/* ─── Entrance animation ──────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy {
  animation: fadeUp 0.6s ease both;
}

.hero-panel {
  animation: fadeUp 0.6s 0.12s ease both;
}

section {
  animation: fadeUp 0.5s ease both;
}

/* ─── Scroll top button ───────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(18, 26, 33, 0.92);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    border-color 0.2s ease;
  z-index: 50;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-wrap,
  .card-grid,
  .skills-grid,
  .link-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }

  .time-tag {
    width: fit-content;
  }
}

@media (max-width: 760px) {
  nav,
  .container,
  .hero,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 36px;
  }

  .signal-grid,
  .form-grid,
  .inline-metrics {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel,
  .card,
  .timeline-card,
  .skill-card,
  .link-card,
  .contact-panel,
  .contact-form {
    border-radius: 16px;
  }

  .hero-copy,
  .hero-panel,
  .contact-panel,
  .contact-form,
  .timeline-card {
    padding: 20px;
  }

  h1 {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }

  .section-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  footer {
    flex-direction: column;
    gap: 14px;
  }
}
