/* ==========================================================================
   blaho.me — 2026 refresh
   Soft blues & cyans, white highlights, subtle lavender/pink hues.
   ========================================================================== */

/* Self-hosted variable fonts (SIL Open Font License 1.1), latin subset */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/sora-latin.woff2") format("woff2");
}

:root {
  --ink: #10233b;
  --body: #48607c;
  --muted: #7b91a8;
  --accent: #0b7dc0;
  --accent-deep: #085e92;
  --bg: #f7fafd;
  --card: #ffffff;
  --line: #dfeaf3;
  --tint: #eef5fb;
  --aurora-cyan: #9fe3f5;
  --aurora-blue: #b7d4f7;
  --aurora-lavender: #d9d2f6;
  --aurora-pink: #f6d8ea;
  --radius: 20px;
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Base ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: var(--card);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
  box-shadow: 0 4px 16px rgba(16, 35, 59, 0.12);
}

/* Navigation ------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(247, 250, 253, 0.75);
  border-bottom: 1px solid rgba(223, 234, 243, 0.7);
}

.nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.nav-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 6.5rem 1.5rem 7rem;
}

/* Signature: soft aurora echoing the holographic portrait backdrop */
.hero-aurora {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  background:
    radial-gradient(38% 42% at 18% 28%, var(--aurora-cyan) 0%, transparent 70%),
    radial-gradient(34% 38% at 82% 22%, var(--aurora-lavender) 0%, transparent 70%),
    radial-gradient(30% 34% at 70% 78%, var(--aurora-pink) 0%, transparent 72%),
    radial-gradient(44% 48% at 32% 82%, var(--aurora-blue) 0%, transparent 70%),
    linear-gradient(180deg, #eef6fc 0%, var(--bg) 100%);
  filter: blur(40px);
  transform: translateZ(0);
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.hero-avatar {
  width: 164px;
  height: 164px;
  margin: 0 auto 1.75rem;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6fd3f2, #7fa8f0 45%, #c5aef0 75%, #f2b9dd);
  box-shadow: 0 12px 40px rgba(83, 132, 198, 0.35);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #fff;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-role {
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--body);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #0d9bd8);
  color: #fff;
  box-shadow: 0 6px 20px rgba(11, 125, 192, 0.3);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 8px 26px rgba(11, 125, 192, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Sections ---------------------------------------------------------------- */

.section {
  padding: 5.5rem 1.5rem;
}

.section-tinted {
  background: linear-gradient(180deg, var(--tint) 0%, #f3f0fa 100%);
}

.section-inner {
  max-width: 1060px;
  margin: 0 auto;
}

.section-narrow {
  max-width: 720px;
}

.section h2 {
  font-size: 2rem;
  font-weight: 700;
}

.section-lead {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.about-text {
  font-size: 1.15rem;
  line-height: 1.75;
  margin: 0;
}

/* Projects ----------------------------------------------------------------- */

.project {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(16, 35, 59, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(16, 35, 59, 0.1);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-logo {
  display: flex;
  align-items: center;
  min-height: 64px;
  margin-bottom: 1.25rem;
}

/* Logo images are pre-normalized to a single slate-gray ink */
.project-logo img {
  max-height: 52px;
  width: auto;
  max-width: 100%;
}

.project h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project h3 a {
  color: var(--ink);
}

.project h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.project p {
  margin-bottom: 0.75rem;
}

.project-meta {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0;
}

.project-meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.project-meta a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Contact form -------------------------------------------------------------- */

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: 0 2px 10px rgba(16, 35, 59, 0.04);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.label-hint {
  font-weight: 400;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 125, 192, 0.15);
}

.form-field textarea {
  resize: vertical;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cf-turnstile {
  margin-bottom: 1rem;
}

.form-alert {
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.form-alert-success {
  background: #e5f7ef;
  color: #10704a;
  border: 1px solid #b8e8d2;
}

.form-alert-error {
  background: #fdeef2;
  color: #a12747;
  border: 1px solid #f5c8d4;
}

/* Footer --------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg) 0%, #eef3fa 100%);
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
}

.social-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 auto 1.75rem;
  padding: 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--body);
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 125, 192, 0.18);
}

.social-links svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Reveal animation ------------------------------------------------------------ */

/* The hidden state is applied by JS, so content stays visible without it */
.reveal-pending {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .project,
  .social-links a {
    transition: none;
  }
}

/* Responsive -------------------------------------------------------------------- */

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

@media (max-width: 600px) {
  .hero {
    padding: 4.5rem 1.25rem 5rem;
  }

  .section {
    padding: 4rem 1.25rem;
  }

  .nav-links {
    gap: 1.1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form {
    padding: 1.5rem;
  }
}
