/* Easykay Editorial: WordPress adjustments.
   style.css is the portfolio's own stylesheet; this file maps it onto WordPress block markup. */

/* Page frame */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block: 0; }
.site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
main#main { display: block; }

/* Block flow: blocks keep the spacing the portfolio styles give them */
:where(.wp-site-blocks) :where(.is-layout-flow) > * { margin-block-start: 0; margin-block-end: 0; }
.wp-block-image { margin: 0; }
.wp-block-image img { display: block; width: 100%; height: auto; }
.wp-block-heading { margin: 0; }
.wp-block-list { margin: 0; }

/* Home: hero */
.hero h1 { margin: 0; }
.hero .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Buttons (design system: Button, CtaButton). Plain buttons are ink with a 4px corner and fill with the accent on hover; the outline variant is ghost. */
.wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--control-height); padding: 0 var(--space-22); border-radius: var(--radius);
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 0.95rem/1.2 var(--ui); letter-spacing: 0; text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wp-block-button .wp-block-button__link:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wp-block-button .wp-block-button__link:active { transform: translateY(1px); }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.wp-block-button .wp-block-button__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Gradient call-to-action pills: the hero and "View project" */
.hero .wp-block-button .wp-block-button__link,
.projects .wp-block-button .wp-block-button__link {
  min-height: var(--touch-min); min-width: var(--cta-width, var(--cta-min-width)); padding: 0 30px; border: 0; border-radius: var(--radius-pill);
  background: var(--cta-gradient); color: #fff; font: 500 1.05rem/1.6 var(--ui); letter-spacing: 0.14em; transition: filter 0.15s;
}
.hero .wp-block-button .wp-block-button__link:hover,
.projects .wp-block-button .wp-block-button__link:hover { background: var(--cta-gradient); color: #fff; border: 0; filter: brightness(1.12); }
.hero .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hero-outline); color: var(--hero-ink); }
.hero .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--hero-wash); color: var(--hero-ink); filter: none; }
.hero .wp-block-button .wp-block-button__link:focus-visible { outline-color: var(--hero-ink); }

/* Home: project rows */
.project > .wp-block-group { min-width: 0; }
.project .wp-block-image.project-media { overflow: hidden; }
.project .wp-block-image.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project .wp-block-image.project-media.phones img { object-fit: contain; padding: 10px 0; }
.project p.desc { margin: 0 0 0.4em; }
.project .facts { margin: 6px 0 22px; }
.projects .wp-block-buttons { display: flex; }
.section-head > * { margin: 0; }
.soon-row .wp-block-image.thumb img { width: 100%; height: 100%; object-fit: cover; }
.soon-row h3 { margin: 0 0 8px; }

/* About */
.ab-hero .wp-block-image.ab-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; position: relative; }
.ab-hero .ab-lead { margin: 0 0 1.1em; }
.ab-hero .ab-more { margin: 0; }
.ab-actions.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.ab-job ul.wp-block-list { padding-left: 1.1em; }
.ab-skill ul.wp-block-list { padding: 0; }
.ab-edu-item p:not(.ab-years) { margin: 0; color: var(--muted); }
.ab-edu-item h3 { margin-bottom: 6px; }

/* Generic pages and posts (anything not built by the theme) */
.ek-content { max-width: 66ch; padding-bottom: clamp(48px, 7vw, 96px); font: 400 1.0625rem/1.65 var(--prose); }
.ek-content > * + * { margin-top: 1em; }
.ek-content h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1; margin-top: 1.4em; }
.ek-content h3 { margin-top: 1.4em; }
.ek-content a { text-decoration-thickness: 1px; }
.cs-hero .wp-block-post-title { font-family: var(--display); font-weight: 400; font-size: clamp(3.25rem, 8vw, 6.5rem); line-height: 0.95; letter-spacing: -0.025em; max-width: 14ch; margin: 0 0 clamp(24px, 4vw, 48px); }
.ek-list { padding-bottom: clamp(48px, 7vw, 96px); }
.ek-list .wp-block-post { padding: 28px 0; border-top: 1px solid var(--rule); }
.ek-list .wp-block-post-title { font-family: var(--display); font-weight: 400; font-size: 2.25rem; line-height: 1.05; }
.ek-list .wp-block-post-title a { text-decoration: none; }
.ek-list .wp-block-post-date { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 8px 0; }
.ek-404 { padding-bottom: clamp(64px, 9vw, 128px); }
.ek-404 .wp-block-buttons { display: flex; margin-top: 28px; }

/* Editor canvas: the site styles need a paper background there too */
.editor-styles-wrapper { background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--ui); }

/* Site Editor: its flow-layout reset would otherwise remove these margins */
.editor-styles-wrapper .hero .hero-role { margin-top: clamp(20px, 3vw, 32px); }
.editor-styles-wrapper .hero .hero-copy { margin-top: clamp(28px, 4vw, 48px); }
.editor-styles-wrapper .hero .hero-actions { margin-top: 36px; }
.editor-styles-wrapper .hero .hero-down { margin-top: clamp(36px, 5vw, 56px); }
.editor-styles-wrapper .project h3 { margin-bottom: 18px; }
.editor-styles-wrapper .project .facts { margin: 6px 0 22px; }
.editor-styles-wrapper .ab-hero h1 { margin-bottom: clamp(24px, 3vw, 40px); }
.editor-styles-wrapper .ab-actions { margin-top: 32px; }

/* Twenty Twenty-Five child: body colours follow the light/dark toggle */
body { background: var(--paper); color: var(--ink); }

/* Saved page content: the sections are Custom HTML blocks, so keep WordPress's layout spacing out of the way. */
.ek-pg.ek-pg { max-width: none; padding: 0; margin: 0; }
.ek-pg.ek-pg > *:not(.wrap) { max-width: none; margin-block: 0; margin-inline: 0; }
/* Project and legal pages: centred column with side gutters. */
.ek-pg.ek-pg > .wrap { width: 100%; max-width: var(--content-max, 1240px); margin-block: 0; margin-inline: auto; padding-inline: var(--gutter, clamp(16px, 4vw, 56px)); box-sizing: border-box; }
.ek-pg .cs-hero, .ek-pg .cs-section { min-width: 0; }
.ek-pg .cs-section > *, .ek-pg .cs-hero > * { min-width: 0; }
.ek-pg .cs-lede, .ek-pg .cs-body p { max-width: 68ch; }
