/* ==========================================================================
   Minal Patel — patelminal.ca
   Palette: "Ink & Amber"
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colour */
  --ink:        #0B0F14;  /* headings, primary text                          */
  --graphite:   #2B3138;  /* body text                                       */
  --muted:      #57616D;  /* secondary text — 5.6:1 on --surface             */
  --accent:     #8A5D0F;  /* amber, text-safe — 5.6:1 on --surface           */
  --accent-dec: #A9761C;  /* amber, decorative only (rules, marks)           */
  --surface:    #FAF7F1;  /* page background — warm paper                    */
  --surface-2:  #F3EEE4;  /* alternating section background                  */
  --card:       #FFFFFF;
  --line:       #E3DCCF;  /* hairlines                                       */
  --line-soft:  #EEE8DC;

  /* Type */
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino,
                  "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.15rem, 1.08rem + 0.36vw, 1.4rem);
  --step-2:  clamp(1.4rem, 1.27rem + 0.62vw, 1.85rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.2vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.8rem + 2.9vw, 4.4rem);

  /* Layout */
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --radius: 4px;

  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--graphite);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

strong { color: var(--ink); font-weight: 600; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100%;
  z-index: 200;
  background: var(--ink);
  color: var(--surface);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: var(--step--1);
}
.skip-link:focus { top: 0.5rem; color: var(--surface); }

/* --------------------------------------------------------------------------
   3. Shared components
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.micro-heading {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-sm { padding: 0.5rem 0.95rem; }

.btn-primary {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: rgba(11, 15, 20, 0.03); }

.btn-meta {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  opacity: 0.65;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips li {
  font-size: var(--step--1);
  line-height: 1.35;
  color: var(--graphite);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
}

/* --------------------------------------------------------------------------
   4. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 14px rgba(11, 15, 20, 0.04);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { display: flex; gap: 1.5rem; }
.site-nav a {
  position: relative;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding-block: 0.4rem;
  transition: color 0.2s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent-dec);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav a[aria-current="true"] { color: var(--ink); }
/* Needs to out-specify `.site-nav a`, which sets the muted link colour. */
.site-nav a.nav-cta { color: var(--surface); }
.site-nav a.nav-cta:hover { color: #FFFFFF; }
.nav-cta::after { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 4px; width: 15px; }
.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child  { transform: translateY(-2.75px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  font-size: var(--step-4);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 34ch;
  margin-bottom: 2rem;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.75rem;
}

.facts {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.fact dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.fact dd {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink);
  font-weight: 500;
}

.hero-portrait picture { display: block; }
.hero-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 14px 14px 0 var(--surface-2);
}

/* --------------------------------------------------------------------------
   6. Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--surface-2); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4rem);
}

.section-head { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
.section-head h2 { font-size: var(--step-3); }
.section-note {
  margin-top: 0.75rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.prose { max-width: 60ch; }
.prose p { font-size: var(--step-0); }

/* Timeline -------------------------------------------------------------- */
.timeline {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.role {
  position: relative;
  padding-left: 1.75rem;
  border-left: 1px solid var(--line);
}
.role::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-dec);
}

.role-head { margin-bottom: 1.1rem; }
.role-title { font-size: var(--step-2); margin-bottom: 0.25rem; }
.role-org {
  margin: 0 0 0.35rem;
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--accent);
}
.role-meta {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.role-meta .dot { opacity: 0.5; }

.bullets { display: grid; gap: 0.8rem; max-width: 62ch; }
.bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: var(--step-0);
  line-height: 1.6;
  text-wrap: pretty;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 1px;
  background: var(--accent-dec);
}

/* Card ------------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.25rem);
}
.card .role-head { margin-bottom: 1.6rem; }
.card .micro-heading { margin-top: 1.6rem; }
.card .role-head + .micro-heading { margin-top: 0; }
.card-text { max-width: 62ch; }

/* Skills ----------------------------------------------------------------- */
.skills-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}

/* Contact ---------------------------------------------------------------- */
.section-contact {
  background: var(--ink);
  color: #D9DDE2;
}
.section-contact h2 { color: #FFFFFF; font-size: var(--step-3); }
.section-contact .eyebrow { color: #D2A24C; }

.contact-inner { max-width: 44rem; }
.contact-lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: #C3C9D0;
  margin: 1.1rem 0 2.5rem;
  max-width: 46ch;
  text-wrap: pretty;
}

.contact-links {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.contact-links li { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.contact-links a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.5rem;
  padding: 1.1rem 0.25rem;
  color: #FFFFFF;
  text-decoration: none;
  transition: padding-left 0.25s var(--ease), background-color 0.25s var(--ease);
}
.contact-links a:hover,
.contact-links a:focus-visible {
  padding-left: 0.9rem;
  background: rgba(255, 255, 255, 0.045);
}
.contact-label {
  flex: 0 0 6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #D2A24C;
}
.contact-value {
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.ext { font-size: 0.7em; margin-left: 0.35em; opacity: 0.7; }

/* Footer ----------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.75rem;
  font-size: var(--step--1);
  color: #9AA3AD;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: #C9CFD6; text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }

/* --------------------------------------------------------------------------
   7. Motion
   -------------------------------------------------------------------------- */
/* Scoped to .js (set by an inline script in <head>) so that with JavaScript
   disabled the content is simply visible rather than stuck at opacity 0. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 62rem) {
  .section-grid { grid-template-columns: 1fr; }
  .section-head { position: static; }
  .section-head h2 { font-size: var(--step-2); }
}

@media (max-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .hero-portrait { order: -1; max-width: 13.5rem; }
  .hero-portrait img { box-shadow: 10px 10px 0 var(--surface-2); }
  .lede { max-width: 46ch; }
  .facts { grid-template-columns: 1fr; }
}

@media (max-width: 48rem) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(11, 15, 20, 0.07);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line-soft); }
  .site-nav ul a {
    display: block;
    padding: 0.9rem 0.15rem;
    font-size: 1rem;
  }
  .site-nav a::after { display: none; }
  .nav-cta { margin-top: 1rem; justify-content: center; }
}

@media (max-width: 30rem) {
  .role { padding-left: 1.25rem; }
  .contact-label { flex-basis: 100%; }
  .contact-links a { gap: 0.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   9. Print — a clean one-page fallback if someone prints the site
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .hero-actions, .site-footer, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section-contact { background: #fff; color: #000; }
  .section-contact h2, .contact-value { color: #000; }
  .contact-label, .section-contact .eyebrow { color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section, .hero { padding-block: 1.25rem; break-inside: avoid; }
  .role { break-inside: avoid; }
}
