/* =========================================================================
   Alex Cannon — Landing Page
   Palette, type, and layout transcribed from the source design.
   Fonts: Pochaevsk (display/titles), Newsreader (body), Geist Mono (labels).
   ========================================================================= */

:root {
  --bg: #f4f1ea;
  --ink: #141311;
  --card: #ffffff;
  --chip: #e9e5da;
  --line: #ece8dd;
  --muted: #3a372f;
  --meta: #5c584f;
  --dim: #c9c4b8;
  --stripe: #e6e1d5;
  --green: #2f7a4a;
  --paper: #f4f1ea;
}

[data-theme="dark"] {
  --bg: #141311;
  --ink: #f4f1ea;
  --card: #1f1d1a;
  --chip: #2a2723;
  --line: #2e2b26;
  --muted: #c9c4b8;
  --meta: #8f8a7e;
  --dim: #8f8a7e;
  --stripe: #262320;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  transition: background .4s, color .4s;
  overflow-x: hidden; /* guard against the wide hero wordmark on very small screens */
}

html { min-height: 100vh; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--green); }

input, textarea, select { font-family: 'Newsreader', Georgia, serif; }
input::placeholder, textarea::placeholder { color: var(--meta); }

::selection { background: var(--green); color: #f4f1ea; }

@keyframes ac-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- Layout primitives ------------------------------------------------- */
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

.mono { font-family: 'Geist Mono', monospace; }
.serif { font-family: 'Pochaevsk', Georgia, serif; }

.eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--meta);
}

.section { padding: clamp(48px, 6vw, 96px) 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.section-title {
  margin: 0;
  font-family: 'Pochaevsk', Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -.025em;
}

/* Visibility helpers (mirror the source's responsive toggles) */
@media (max-width: 767px) { .ac-desktop { display: none !important; } }
@media (min-width: 768px) { .ac-mobile { display: none !important; } }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  background: var(--bg);
  transition: background .4s;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* The wordmark uses the exact brand SVG (see brand.html) so it renders
   identically to the downloadable logo. Light logo on pale grounds, dark
   logo on dark grounds — swapped purely by the theme attribute. */
.brand-word {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  transition: opacity .25s;
}
.brand-word:hover { opacity: .62; }

.brand-logo { display: block; height: 38px; width: auto; }
.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: block; }

.nav-links { display: flex; gap: 28px; flex-wrap: wrap; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 6px 0 14px;
  background: var(--chip);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  font: inherit;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.theme-toggle:hover { background: var(--green); color: #f4f1ea; }

.knob {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  transition: background .4s;
  overflow: hidden;
}
.knob-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  top: 3px;
  left: -12px;
  transition: left .4s cubic-bezier(.34, 1.56, .64, 1);
}
[data-theme="dark"] .knob-dot { left: 3px; }

.pill-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  transition: all .25s;
}
.pill-cta:hover { background: var(--green); color: #f4f1ea; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  font: inherit;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.menu-btn:hover { color: var(--bg); }
.menu-btn .bars { display: flex; flex-direction: column; gap: 5px; width: 18px; }
.menu-btn .bars span { height: 1.5px; background: var(--bg); }

/* =========================================================================
   MOBILE MENU OVERLAY
   ========================================================================= */
.menu {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
  padding: 110px 20px 48px;
  transform: translateY(6%);
  opacity: 0;
  pointer-events: none;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1), opacity .4s ease;
}
.menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.menu-eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--meta);
  padding: 0 8px 16px;
}

.menu-services { display: flex; flex-direction: column; gap: 12px; }

.menu-service {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: var(--card);
  border-radius: 16px;
}
.menu-service .num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--green);
}
.menu-service .body { display: flex; flex-direction: column; gap: 4px; }
.menu-service .title {
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.02em;
}
.menu-service .desc { font-size: 15px; color: var(--muted); }

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 44px 8px 0;
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -.025em;
}
.menu-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-links a span { font-size: 32px; }

.menu-cta {
  display: flex;
  justify-content: center;
  margin: 44px 0 0;
  background: var(--ink);
  color: var(--bg);
  padding: 18px;
  border-radius: 999px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.menu-cta:hover { background: var(--green); color: #f4f1ea; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px) 0;
}

.hero-loc {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: clamp(16px, 2vw, 28px);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--meta);
}
.hero-loc .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.hero-title {
  margin: 0;
  display: flex;
  font-family: 'Pochaevsk', Georgia, serif;
  font-weight: 400;
  font-size: clamp(48px, 11.6vw, 178px);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-letter {
  display: inline-block;
  transition: color .3s, transform .5s cubic-bezier(.34, 1.8, .5, 1);
  cursor: default;
}
.hero-letter:hover { color: var(--green); transform: translateY(-.14em) rotate(-6deg); }
.hero-letter.is-untyped { visibility: hidden; }

.caret {
  display: inline-block;
  width: .06em;
  margin-left: .04em;
  background: var(--green);
  height: .85em;
  align-self: center;
  visibility: hidden;
  animation: ac-blink 1s steps(2) infinite;
}
.caret.is-on { visibility: visible; }

.hero-sub {
  margin: clamp(24px, 3vw, 40px) 0 0;
  width: 100%;
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -.015em;
  text-wrap: pretty;
}

/* =========================================================================
   ABOUT
   ========================================================================= */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
  padding: clamp(48px, 6vw, 96px) 0;
}
.about p {
  margin: 0;
  max-width: 60ch;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}
.tag-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .04em;
}
.tag {
  background: var(--chip);
  border-radius: 999px;
  padding: 7px 14px;
}

/* =========================================================================
   SERVICES
   ========================================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 340px;
  transition: transform .3s, box-shadow .3s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(20, 19, 17, .25);
}
.card-num {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--green);
}
.card h3 {
  margin: 0;
  font-family: 'Pochaevsk', Georgia, serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.02em;
}
.card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  flex: 1;
}
.card ul {
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* =========================================================================
   EXPERIENCE
   ========================================================================= */
.panel {
  background: var(--card);
  border-radius: 20px;
  padding: 8px 28px;
}
.role {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: color .25s;
}
.role:hover { color: var(--green); }
.role-years {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--meta);
  padding-top: 6px;
}
.role-title {
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -.015em;
}
.role-org { font-size: 16px; color: var(--muted); margin-top: 6px; }
.role-note {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  padding-top: 6px;
}

.link-underline {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
.link-underline:hover { color: var(--green); text-decoration-color: var(--green); }

/* =========================================================================
   EDUCATION + SKILLS
   ========================================================================= */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  padding: clamp(48px, 6vw, 96px) 0;
}
.col-label {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--meta);
  margin-bottom: 28px;
}
.edu-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.edu-title {
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: 24px;
  line-height: 1.1;
}
.edu-meta { font-size: 15px; color: var(--muted); margin-top: 4px; }

.skill-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skill-block .edu-title { line-height: 1.1; }
.chip-set { display: flex; gap: 8px; flex-wrap: wrap; }
.skill-chip {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  transition: all .2s;
}
.skill-chip:hover { background: var(--green); border-color: var(--green); color: #f4f1ea; }

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact { padding: clamp(48px, 6vw, 96px) 0 40px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  align-items: start;
}
.contact-title {
  margin: 0 0 24px;
  font-family: 'Pochaevsk', Georgia, serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 110px);
  line-height: .95;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.contact-lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 44ch;
}
.contact-links {
  margin-top: 32px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  line-height: 2;
  letter-spacing: .03em;
}
.contact-links a { display: block; }

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 12px;
}
.field-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--meta);
}
.field input {
  background: transparent;
  border: 0;
  font-size: 22px;
  padding: 4px 0;
  outline: none;
  color: var(--ink);
}
.field textarea {
  background: transparent;
  border: 0;
  font-size: 20px;
  line-height: 1.4;
  padding: 4px 0;
  outline: none;
  resize: vertical;
  color: var(--ink);
}
.field.needs-field { gap: 10px; }

.needs { display: flex; gap: 8px; flex-wrap: wrap; }
.needs-chip {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: all .2s;
}
.needs-chip:hover { border-color: var(--green); }
.needs-chip.active {
  background: var(--green);
  color: #f4f1ea;
  border-color: var(--green);
}

.btn-send {
  margin-top: 12px;
  align-self: flex-start;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  padding: 18px 32px;
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: 24px;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: all .25s;
}
.btn-send:hover { background: var(--green); color: #f4f1ea; transform: translateY(-2px); }

.success {
  background: var(--green);
  color: #f4f1ea;
  padding: 40px;
  border-radius: 20px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.success .big {
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -.02em;
}
.success .small { font-size: 18px; line-height: 1.5; }

.is-hidden { display: none !important; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0 32px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--meta);
}
.footer .credit { display: flex; align-items: center; gap: 12px; }
.footer .credit .name {
  font-family: 'Pochaevsk', Georgia, serif;
  font-size: 18px;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
}

/* =========================================================================
   RESPONSIVE — stack the fixed grids on small screens
   ========================================================================= */
@media (max-width: 767px) {
  .about { grid-template-columns: 1fr; gap: 20px; }
  .role {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .role-years { padding-top: 0; }
  .role-note { padding-top: 0; }
}

/* Keep the nowrap hero wordmark inside narrow viewports. */
@media (max-width: 600px) {
  .hero-title { font-size: min(11vw, 64px); }
}

/* =========================================================================
   ACCESSIBILITY — respect reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .caret { display: none; }
}
