:root {
  --bg: #ffffff;
  --panel: #f6f7fb;
  --text: #1b1f24;
  --muted: #667085;
  --accent: #2057d6;
  --ring: rgba(32, 87, 214, 0.18);
  --border: rgba(0,0,0,.08);
}
:root.dark { --bg:#0b0c10; --panel:#111218; --text:#e6e6e6; --muted:#a3a3a3; --accent:#5a8bff; --ring:rgba(90,139,255,.25); --border:rgba(255,255,255,.08); }

:root { --font-sans: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Roboto, Inter, Helvetica, Arial, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: var(--bg); color: var(--text); line-height: 1.65; }

a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; background: rgba(255,255,255, .78); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border) }
:root.dark .site-header{ background: rgba(11,12,16,.7) }
.brand{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:12px; background:var(--panel); color:var(--text); font-weight:800; border:1px solid var(--border) }
.nav-list{ display:flex; gap:.8rem; list-style:none; margin:0; padding:0; align-items:center } .nav-toggle{ display:none }
.theme-btn{ border:1px solid var(--border); background:var(--panel); color:var(--text); padding:.35rem .55rem; border-radius:8px; cursor:pointer }

.hero{ display:grid; place-items:center; padding:42px 1rem 14px; background: radial-gradient(900px 360px at 50% -10%, rgba(32,87,214,.09), transparent 55%) }
.hero-inner{ max-width:980px; text-align:center }
.headshot{ width:min(92vw, 820px); height:auto; border-radius:14px; border:1px solid var(--border); box-shadow:0 6px 24px var(--ring) }
.hero h1{ font-size:2.2rem; margin:.6rem 0 .2rem; letter-spacing:-.01em }
.kicker{ font-weight:600; color:var(--muted) }

.cta-row{ display:flex; gap:.6rem; justify-content:center; margin-top:.75rem }
.btn{ display:inline-block; background:var(--accent); color:#fff; padding:.6rem .9rem; border-radius:10px; border:none; font-weight:700; box-shadow:0 6px 18px var(--ring) }
.btn.ghost{ background:transparent; color:var(--accent); border:1px solid var(--accent) }

.section{ padding:34px 1rem; max-width:980px; margin:0 auto }
.section h2{ font-size:1.55rem; margin:0 0 .7rem }
.bullets{ margin:.4rem 0 0; padding-left:1rem }
.list{ padding-left:1rem }

.cards{ display:grid; gap:.8rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) }
.card{ background:var(--panel); border:1px solid var(--border); padding:.9rem; border-radius:14px }
.card h3{ margin-top:0; font-size:1.1rem }

.timeline .item{ background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:.9rem; margin-bottom:.8rem }

.links{ display:flex; gap:.8rem; margin-top:.6rem; flex-wrap:wrap }

.gallery{ display:grid; gap:10px; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)) }
.gallery figure{ margin:0; background:var(--panel); border:1px solid var(--border); border-radius:12px; overflow:hidden }
.gallery img{ display:block; width:100%; height:auto }
.gallery figcaption{ padding:.45rem .7rem; color:var(--muted); font-size:.9rem }

.site-footer{ padding:28px 1rem; text-align:center; color:var(--muted); border-top:1px solid var(--border); margin-top:1.4rem }

/* Articles tile grid */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}
.tile img {
  width: 100%;
  height: 160px;          /* adjust height to taste */
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}
.tile-body { padding: 12px; }
.tile-body h3 { margin: 0 0 6px; font-size: 1.05rem; }
.tile-body p { margin: 0 0 8px; color: var(--muted); }
.tile-meta { color: var(--muted); font-size: .9rem; }

/* Two columns + compact sizing */
.tiles--two {
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* exactly two */
  gap: 10px;
  max-width: 820px;          /* optional: keeps the row tidy */
  margin: 0 auto;
}
@media (max-width: 680px) {
  .tiles--two { grid-template-columns: 1fr; } /* one column on phones */
}

/* Smaller tile visuals */
.tiles--compact .tile img {
  height: 120px;             /* was 160px */
  object-fit: cover;
}
.tiles--compact .tile img { height: 360px; }
.tiles--compact .tile-body { padding: 10px; }
.tiles--compact .tile-body h3 { font-size: 0.98rem; margin: 0 0 4px; }
.tiles--compact .tile-body p  { font-size: 0.92rem; margin: 0 0 6px; }
.tiles--compact .tile-meta    { font-size: 0.8rem; }

/* About section */
.about .about-wrap{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.about .about-photo{
  width: 160px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.about .about-text h2{
  font-size: 1.4rem;
  margin: 0 0 .6rem;
}
@media (min-width: 980px){
  .about .about-wrap{ grid-template-columns: 200px 1fr; }
  .about .about-photo{ width: 200px; }
}
@media (max-width: 640px){
  .about .about-wrap{ grid-template-columns: 1fr; }
  .about .about-photo{ width: 140px; margin: 0 auto; }
  .about .about-text{ text-align: left; }
}

.tiles--three{
  grid-template-columns: repeat(3, minmax(0,1fr)); /* exactly three */
  gap: 12px;
  max-width: 1100px;   /* optional, keeps the row tidy */
  margin: 0 auto;
}

/* Focus card images */
.card-media{
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: .55rem;
}
.card-media img{
  display: block;
  width: 100%;
  height: 160px;        /* adjust 140–200px to taste */
  object-fit: cover;
}

/* If your grid doesn’t already define columns, keep this */
.cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}

@media (max-width: 900px){ .cards{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .cards{ grid-template-columns: 1fr; } }

@media (max-width: 900px){ .tiles--three{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .tiles--three{ grid-template-columns: 1fr; } }

@media (max-width:760px){ .nav-toggle{ display:inline-block; background:var(--panel); color:var(--text); border:1px solid var(--border); padding:.45rem .55rem; border-radius:8px } .nav-list{ display:none; position:absolute; right:1rem; top:56px; background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:.5rem; flex-direction:column } .nav.open .nav-list{ display:flex } .section{ padding:28px 1rem } }

/* Make all links black with an underline */
a,
a:visited {
  color: #111 !important;                 /* black */
  text-decoration: underline;             /* keep underline */
  text-underline-offset: 3px;
}

/* Slightly stronger hover underline (still black) */
a:hover {
  text-decoration-thickness: 2px;
}

/* Keep buttons looking like buttons (don’t turn those links black/underlined) */
a.btn,
a.btn:visited {
  color: #fff !important;
  text-decoration: none;
}

/* (Optional) Keep top-nav tidy: no underline until hover */
.nav-list a { text-decoration: none; }
.nav-list a:hover { text-decoration: underline; }

/* Smooth transitions for Focus cards */
.cards .card{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

/* Hover/keyboard highlight */
.cards .card:hover,
.cards .card:focus-within{
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  border-color: var(--accent, #111);
  background: #fff; /* keep it minimal; tweak if you use a panel color */
}

/* Visible focus outline for accessibility (Tab key) */
.cards .card:focus-visible{
  outline: 2px solid var(--accent, #111);
  outline-offset: 3px;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce){
  .cards .card{ transition: none; }
  .cards .card:hover{ transform: none; }
}

a.btn.ghost,
a.btn.ghost:visited {
  color: var(--accent) !important;
  background: transparent;
  border: 1px solid var(--accent);
}

/* Make the whole appointment tile behave like a clickable card */
.item.appt{
  position: relative;                 /* anchor overlay positioning */
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .9rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
  cursor: pointer;
}

/* Hover & keyboard focus highlight */
.item.appt:hover,
.item.appt:focus-within{
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  border-color: var(--accent, #111);
  background: #fff;
}

/* Accessible focus ring when tabbing onto the tile */
.item.appt:focus-visible{
  outline: 2px solid var(--accent, #111);
  outline-offset: 3px;
}

/* The ‘stretched’ link that covers the whole tile (but stays visually invisible) */
.item.appt .stretched-link{
  position: absolute;
  inset: 0;                           /* cover entire tile */
  z-index: 5;
  text-decoration: none !important;   /* override global link underline */
  color: inherit !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .item.appt{ transition: none; }
  .item.appt:hover{ transform: none; }
}
/* Appointments: tighter spacing + distinct sizes */
.item.appt{ 
  line-height: 1.5;                /* was 1.65 globally */
  padding: .8rem .85rem;           /* slightly tighter tile padding */
}

/* Headings inside each appointment */
.item.appt h3{ 
  margin: 0 0 .35rem; 
  line-height: 1.35;               /* tighter line spacing */
}

/* 1st line = company (largest) */
.item.appt h3:nth-of-type(1){
  font-size: 1.08rem;
  font-weight: 700;
}

/* 2nd line = role (a bit smaller) */
.item.appt h3:nth-of-type(2){
  font-size: 1.0rem;
  font-weight: 600;
}

/* 3rd line = dates/location (smallest) */
.item.appt h3:nth-of-type(3){
  font-size: .95rem;
  font-weight: 500;
}
.item.appt h3:nth-of-type(3) .muted{ color: var(--muted); }

/* Bullet list: reduce gaps */
.item.appt ul{
  margin: .35rem 0 0;              /* smaller top margin */
  padding-left: 1rem;
}
.item.appt li{ 
  margin: .2rem 0;                 /* tighter between bullets */
}

