/* ==========================================================================
   Dannyokec — personal portfolio
   Registry aesthetic: cool paper, ink navy, electric blue, mono ledger data
   ========================================================================== */

:root {
  --paper: #fafbfe;
  --ink: #0c1b33;
  --ink-soft: #47546c;
  --blue: #1d63ff;
  --blue-deep: #0a2e7e;
  --line: #d9e1f0;
  --chip: #eef3fc;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --pad-x: clamp(1.25rem, 5vw, 4.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem var(--pad-x);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}

.wordmark img { height: 26px; width: auto; }

.topnav {
  display: flex;
  gap: 1.5rem;
  margin-inline: auto;
}

.topnav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.topnav a:hover { color: var(--blue); }

.topbar-rc {
  text-decoration: none;
  color: var(--blue-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.topbar-rc:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 8vh, 6rem) var(--pad-x) clamp(3rem, 7vh, 5rem);
  max-width: 1280px;
  margin-inline: auto;
}

.eyebrow {
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero-sub {
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 1.8rem;
}

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

.btn {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-solid {
  background: var(--blue);
  color: #fff;
}

.btn-solid:hover { background: var(--blue-deep); transform: translateY(-1px); }

.btn-line {
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.btn-line:hover { border-color: var(--blue); color: var(--blue); }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.facts dt { color: var(--blue-deep); margin-bottom: 0.15rem; }

.facts dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

/* portrait + rotating stamp */

.hero-figure {
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
}

.portrait {
  width: 100%;
  aspect-ratio: 733 / 744;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -28px rgba(12, 27, 51, 0.35);
}

.stamp {
  position: absolute;
  top: -3.2rem;
  right: -3.2rem;
  width: 7.5rem;
  height: 7.5rem;
  z-index: 2;
  background: var(--paper);
  border-radius: 50%;
  box-shadow: 0 8px 24px -12px rgba(12, 27, 51, 0.3);
}

.stamp svg {
  width: 100%;
  height: 100%;
  animation: stamp-spin 26s linear infinite;
}

.stamp text {
  font-family: var(--font-mono);
  font-size: 15.5px;
  letter-spacing: 2.5px;
  fill: var(--blue);
}

@keyframes stamp-spin {
  to { transform: rotate(360deg); }
}

/* ---------- sections ---------- */

.section {
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(3rem, 8vh, 5.5rem) var(--pad-x);
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: 2.4rem; }

.section-head h2,
.section-contact h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  max-width: 40rem;
}

.section-note {
  color: var(--ink-soft);
  max-width: 36rem;
  margin-top: 0.8rem;
  font-size: 0.98rem;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  font-weight: 500;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 62rem;
}

.group-grid p:not(.lede) { color: var(--ink-soft); }

/* ---------- registry ledger (signature) ---------- */

.ledger {
  list-style: none;
  border-top: 2px solid var(--ink);
}

.ledger-row {
  display: grid;
  grid-template-columns: 2.4rem 3.4rem minmax(0, 1fr) 11rem 8.5rem;
  gap: 1.2rem;
  align-items: center;
  padding: 1.05rem 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.ledger-row:hover { background: var(--chip); }

.ledger-index { color: var(--ink-soft); }

.ledger-logo {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.ledger-logo img {
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
}

.ledger-mark {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue-deep);
}

.ledger-name strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}

.ledger-name span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.ledger-sector {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-deep);
}

.ledger-rc {
  justify-self: end;
  color: var(--blue);
  border: 1.5px solid currentColor;
  border-radius: 6px;
  padding: 0.32rem 0.55rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.ledger-row:hover .ledger-rc {
  background: var(--blue);
  color: #fff;
}

.registry-flagship {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2.2rem;
  padding: 1.2rem 1.4rem;
  border: 1px dashed var(--blue);
  border-radius: 16px;
  max-width: 44rem;
}

.registry-flagship img {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.registry-flagship p {
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.registry-flagship strong { color: var(--ink); }

/* ---------- on the ground ---------- */

.ground-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: center;
}

.ground-grid figure img {
  border-radius: 20px;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ground-copy p:not(.lede):not(.mono) { color: var(--ink-soft); margin-top: 1rem; }

.ground-caption {
  margin-top: 1.6rem;
  color: var(--blue);
}

/* ---------- media ---------- */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.media-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem;
  background: #fff;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.media-card:hover { border-color: var(--blue); transform: translateY(-3px); }

.media-card img {
  height: 44px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.media-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.media-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- contact ---------- */

.section-contact { text-align: center; }

.contact-big {
  margin-top: 0.4rem;
}

.contact-big a {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 3px solid var(--blue);
  transition: color 0.15s ease;
}

.contact-big a:hover { color: var(--blue); }

.contact-meta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.6rem;
  color: var(--ink-soft);
}

.contact-meta .mono { color: var(--blue-deep); margin-right: 0.5rem; }

.contact-meta a { text-decoration: none; }

.contact-meta a:hover { color: var(--blue); }

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  justify-content: space-between;
  padding: 1.4rem var(--pad-x) 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .stamp svg { animation: none; }
  .btn, .media-card { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .topnav { display: none; }
  .topbar { justify-content: space-between; }

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

  .hero-figure {
    order: -1;
    width: min(100%, 300px);
    justify-self: start;
  }

  .stamp { right: -1rem; top: -2.4rem; width: 6.2rem; height: 6.2rem; }

  .ledger-row {
    grid-template-columns: 3.4rem minmax(0, 1fr) auto;
    grid-template-areas:
      "logo name rc"
      "logo sector rc";
    row-gap: 0.3rem;
  }

  .ledger-index { display: none; }
  .ledger-logo { grid-area: logo; }
  .ledger-name { grid-area: name; }
  .ledger-sector { grid-area: sector; }
  .ledger-rc { grid-area: rc; align-self: center; }

  .ground-grid { grid-template-columns: 1fr 1fr; }
  .ground-copy { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 560px) {
  .ground-grid { grid-template-columns: 1fr; }
  .ledger-rc { font-size: 0.68rem; padding: 0.26rem 0.4rem; }
  .topbar-rc { display: none; }
}
