/* Component styles for content built in the block editor (homepage, Research, CV).
   Loaded on the front end and inside the editor. */

/* ---------- Section shells ---------- */
.ak-section {
	max-width: var(--wrap, 1200px);
	margin-inline: auto !important;
	padding: var(--section, 96px) var(--gutter, 24px);
}
.ak-section > * { margin-top: 0; margin-bottom: 0; }
.ak-section > * + * { margin-top: clamp(28px, 4vw, 48px); }
/* A full-bleed warm band with rounded corners (like a big card). */
.ak-band {
	max-width: calc(var(--wrap, 1200px) + 160px) !important;
	margin-inline: auto !important;
	background: var(--bg-2);
	border-radius: var(--radius-lg, 28px);
	padding: var(--section, 96px) var(--gutter, 24px) !important;
}
.ak-band > * { max-width: var(--wrap, 1200px); margin-inline: auto !important; margin-top: 0; margin-bottom: 0; }
.ak-band > * + * { margin-top: clamp(28px, 4vw, 48px) !important; }
@media (min-width: 1400px) { .ak-band { margin-inline: auto !important; } }
@media (max-width: 1240px) { .ak-band { margin-inline: clamp(0px, 1.5vw, 16px) !important; } }

.ak-head { text-align: center; max-width: 760px; margin-inline: auto !important; }
.ak-head > * { margin: 0 !important; }
.ak-head > * + * { margin-top: 14px !important; }
.ak-head h2 { font-size: clamp(2.2rem, 3.4vw + 1rem, 4rem); line-height: 1.08; }
.ak-head p { color: var(--muted); font-size: 1.2rem; }
.ak-head--left { text-align: left; margin-inline: 0 !important; }
p.ak-kicker {
	display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 500; color: var(--muted);
}
p.ak-kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--coral); }
.ak-head p.ak-kicker { justify-content: center; }
.ak-lead { font-size: 1.2rem; color: var(--muted); max-width: 680px; }

/* ---------- Hero ---------- */
.ak-hero {
	max-width: calc(var(--wrap, 1200px) + 160px) !important; margin-inline: auto !important;
	background: var(--bg-2); border-radius: 0 0 var(--radius-lg, 28px) var(--radius-lg, 28px);
	padding: clamp(32px, 6vw, 80px) var(--gutter, 24px) clamp(48px, 7vw, 96px) !important;
}
@media (max-width: 1240px) { .ak-hero { margin-inline: clamp(0px, 1.5vw, 16px) !important; } }
.ak-hero > .wp-block-columns { max-width: var(--wrap, 1200px); margin: 0 auto !important; align-items: center !important; gap: clamp(32px, 6vw, 88px); }
.ak-hero h1 { margin: 0 0 10px; }
.ak-hero p.ak-greeting {
	font-family: var(--font-head); font-variation-settings: "SOFT" 100; font-size: clamp(1.4rem, 1vw + 1rem, 1.9rem);
	color: var(--muted); margin: 0 0 6px; letter-spacing: -0.02em;
}
.ak-hero .ak-greeting .wave { display: inline-block; transform-origin: 70% 70%; animation: ak-wave 2.4s ease-in-out 1s 2; }
@keyframes ak-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .ak-hero .ak-greeting .wave { animation: none; } }
.ak-hero h1 .ak-mark, .ak-mark {
	background: linear-gradient(transparent 62%, color-mix(in srgb, var(--sun) 75%, transparent) 62%, color-mix(in srgb, var(--sun) 75%, transparent) 92%, transparent 92%);
	padding: 0 .06em; border-radius: 4px;
}
[data-theme="dark"] .ak-mark {
	background: linear-gradient(transparent 70%, color-mix(in srgb, var(--coral) 55%, transparent) 70%, color-mix(in srgb, var(--coral) 55%, transparent) 92%, transparent 92%);
}
.ak-hero p.ak-intro {
	display: inline-block; font-size: 1.05rem; font-weight: 500; color: var(--ink);
	background: var(--surface); padding: 8px 16px; border-radius: 999px; margin: 6px 0 22px; box-shadow: var(--shadow-sm);
}
.ak-hero p.ak-bio { font-size: clamp(1.15rem, .4vw + 1rem, 1.35rem); color: var(--text); max-width: 560px; margin: 0 0 30px; line-height: 1.6; }

/* Hero: small circular portrait with a soft ring and shape behind it */
.ak-hero .ak-hero-slides { max-width: 300px; aspect-ratio: 1 / 1; }
.ak-hero .ak-hero-slides::before {
	inset: -14px -14px -14px -14px; border-radius: 50%; transform: none; opacity: 1;
	background: conic-gradient(from 200deg, var(--sun), var(--coral) 45%, var(--teal) 75%, var(--sun));
}
.ak-hero .ak-hero-slides img {
	border-radius: 50% !important; object-position: 50% 30%;
	border: 6px solid var(--bg-2); box-shadow: 0 20px 44px -16px rgba(27, 22, 36, .35);
}
.ak-hero .ak-slides-ui { bottom: 6px; }

/* Photo with soft shape behind (also used by .ak-photo elsewhere) */
.ak-hero-photo-col { position: relative; }
.ak-hero-slides, .ak-photo-frame { position: relative; width: 100%; max-width: 440px; margin-inline: auto !important; aspect-ratio: 4 / 5; display: block !important; }
.ak-hero-slides::before, .ak-photo-frame::before {
	content: ""; position: absolute; z-index: 0; inset: 6% -7% -6% 9%;
	background: var(--sun); border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
	opacity: .9; transform: rotate(-4deg);
}
.ak-photo-frame.is-teal::before { background: var(--teal); transform: rotate(5deg); inset: 8% 8% -6% -7%; }
.ak-photo-frame.is-coral::before { background: var(--coral); opacity: .75; transform: rotate(3deg); }
.ak-hero-slides > figure.wp-block-image, .ak-photo-frame > figure.wp-block-image { position: absolute; inset: 0; margin: 0 !important; z-index: 1; transition: opacity 1.1s ease; }
.ak-hero-slides.is-ready > figure.wp-block-image { opacity: 0; }
.ak-hero-slides.is-ready > figure.wp-block-image.is-active { opacity: 1; z-index: 2; }
.ak-hero-slides > figure:not(:first-of-type) { opacity: 0; }
.ak-hero-slides.is-ready > figure:not(:first-of-type) { opacity: 0; }
.ak-hero-slides img, .ak-photo-frame img {
	width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%;
	border-radius: var(--radius, 24px); display: block; box-shadow: var(--shadow);
}
.ak-slides-ui {
	position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3;
	display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px;
	background: rgba(27, 22, 36, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ak-slides-ui button { border: 0; padding: 0; cursor: pointer; background: transparent; color: #fff; display: grid; place-items: center; }
.ak-slides-ui .dot { width: 22px; height: 22px; }
.ak-slides-ui .dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: width .3s ease, background-color .3s ease; }
.ak-slides-ui .dot[aria-current="true"]::before { width: 18px; border-radius: 999px; background: #fff; }
.ak-slides-ui .pause { width: 26px; height: 22px; border-left: 1px solid rgba(255, 255, 255, .3); padding-left: 4px; }
.ak-slides-ui .pause svg { width: 12px; height: 12px; }

@media (max-width: 781px) {
	.ak-hero > .wp-block-columns { flex-direction: column; align-items: stretch !important; }
	.ak-hero .wp-block-column { width: 100%; flex-basis: auto !important; }
	.ak-hero .ak-hero-slides { max-width: 180px; width: calc(100% - 40px); margin: 18px 0 12px 14px !important; }
	.ak-hero p.ak-intro { font-size: .95rem; border-radius: 16px; }
}

/* ---------- Highlights strip ---------- */
.ak-strip { padding: clamp(28px, 4vw, 44px) var(--gutter, 24px) !important; max-width: var(--wrap, 1200px); margin-inline: auto !important; text-align: center; }
.ak-strip > * { margin: 0 !important; }
.ak-strip p.ak-strip-label { color: var(--faint); font-size: .95rem; font-weight: 500; margin-bottom: 16px !important; }
.ak-strip ul.ak-strip-list {
	list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
	gap: 12px clamp(24px, 5vw, 64px); margin: 0 !important;
}
.ak-strip ul.ak-strip-list li {
	margin: 0; font-family: var(--font-head); font-variation-settings: "SOFT" 100; font-weight: 600;
	font-size: clamp(1.1rem, .8vw + 1rem, 1.5rem); letter-spacing: -0.02em; color: var(--faint);
	transition: color .2s ease;
}
.ak-strip ul.ak-strip-list li:hover { color: var(--ink); }

/* ---------- Cards ---------- */
.ak-cards { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.ak-cards.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ak-cards > * { margin: 0 !important; }
.ak-card, .wp-block-group.is-style-ak-card, .wp-block-group.is-style-ak-card-white,
.wp-block-group.is-style-ak-card-coral, .wp-block-group.is-style-ak-card-teal, .wp-block-group.is-style-ak-card-sun {
	position: relative; background: var(--bg-2); border-radius: var(--radius, 24px);
	padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; gap: 14px;
	transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.ak-band .ak-card, .ak-band .is-style-ak-card, .wp-block-group.is-style-ak-card-white { background: var(--bg); }
.wp-block-group.is-style-ak-card-coral { background: var(--coral-soft); }
.wp-block-group.is-style-ak-card-teal { background: var(--teal-soft); }
.wp-block-group.is-style-ak-card-sun { background: var(--sun-soft); }
.ak-cards > .wp-block-group:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ak-cards > .wp-block-group > * { margin: 0 !important; }
.ak-cards h3 { font-size: clamp(1.6rem, 1.2vw + 1rem, 2.25rem); line-height: 1.12; }
.ak-cards p { color: var(--muted); font-size: 1.08rem; }
.ak-cards .ak-push { margin-top: auto !important; }
.ak-cards p.ak-card-link a { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.ak-cards p.ak-card-link a::after { content: " →"; display: inline-block; text-decoration: none; transition: transform .15s ease; margin-left: 2px; }
.ak-cards p.ak-card-link a:hover::after { transform: translateX(3px); }

/* Icon badges: paragraph with style "Icon: …" */
p[class*="is-style-ak-icon-"] {
	display: flex !important; align-items: center; gap: 12px; font-size: .95rem !important; font-weight: 500; color: var(--ink) !important;
}
p[class*="is-style-ak-icon-"]::before {
	content: ""; flex: none; width: 56px; height: 56px; border-radius: 18px; background-color: var(--coral-soft);
	background-repeat: no-repeat; background-position: center; background-size: 28px 28px;
}
.is-style-ak-icon-bank::before   { background-color: var(--coral-soft) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C2562C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10h18L12 4z'/%3E%3Cpath d='M5 10v8M9.5 10v8M14.5 10v8M19 10v8M3 20h18'/%3E%3C/svg%3E"); }
.is-style-ak-icon-chart::before  { background-color: var(--teal-soft) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E6B62' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V4M4 20h16'/%3E%3Ccircle cx='8' cy='15' r='1.2'/%3E%3Ccircle cx='11' cy='11' r='1.2'/%3E%3Ccircle cx='15' cy='12' r='1.2'/%3E%3Ccircle cx='18' cy='7' r='1.2'/%3E%3Cpath d='M7 16l12-9'/%3E%3C/svg%3E"); }
.is-style-ak-icon-market::before { background-color: var(--sun-soft) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23946A00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l5-5 4 4 8-8'/%3E%3Cpath d='M15 8h5v5'/%3E%3C/svg%3E"); }
.is-style-ak-icon-laptop::before { background-color: #EEE6FB !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B4BB5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='11' rx='2'/%3E%3Cpath d='M2 19h20'/%3E%3C/svg%3E"); }
.is-style-ak-icon-book::before   { background-color: var(--teal-soft) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E6B62' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 19V5'/%3E%3C/svg%3E"); }
.is-style-ak-icon-award::before  { background-color: var(--sun-soft) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23946A00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='5'/%3E%3Cpath d='M8.5 13.5L7 21l5-3 5 3-1.5-7.5'/%3E%3C/svg%3E"); }
[data-theme="dark"] p[class*="is-style-ak-icon-"]::before { filter: saturate(1.1); }
[data-theme="dark"] .is-style-ak-icon-laptop::before { background-color: #2B2440 !important; }

/* ---------- About ---------- */
.ak-about > .wp-block-columns { align-items: center !important; gap: clamp(32px, 6vw, 80px); margin: 0 !important; }
.ak-about .ak-photo-frame { max-width: 460px; }
.ak-stats { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px !important; }
.ak-stats > * { margin: 0 !important; }
.ak-stat-card { background: var(--bg); border-radius: 20px; padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; }
.ak-stat-card > * { margin: 0 !important; }
.ak-stat-card .ak-stat-num { font-family: var(--font-head); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: clamp(2rem, 2vw + 1rem, 2.75rem); line-height: 1.05; color: var(--ink); letter-spacing: -0.03em; }
.ak-stat-card .ak-stat-num small { font-size: .45em; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.ak-stat-card p:not(.ak-stat-num) { color: var(--muted); font-size: .98rem; line-height: 1.45; }
.ak-stat-card.is-coral { background: var(--coral-soft); }
.ak-stat-card.is-teal { background: var(--teal-soft); }
.ak-stat-card.is-sun { background: var(--sun-soft); }
.ak-dse > figure.wp-block-image { order: 2; }
.ak-dse { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0; align-items: stretch; background: var(--bg); border-radius: var(--radius, 24px); overflow: hidden; margin-top: clamp(24px, 3vw, 36px) !important; }
.ak-dse > * { margin: 0 !important; }
.ak-dse figure.wp-block-image { height: 100%; }
.ak-dse figure.wp-block-image img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.ak-dse-text { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.ak-dse-text > * { margin: 0 !important; }
.ak-dse-text h3 { font-size: clamp(1.5rem, 1vw + 1rem, 2rem); }
.ak-dse-text p { color: var(--muted); }

/* ---------- Research ---------- */
.ak-research-head > .wp-block-columns { align-items: end !important; gap: clamp(24px, 4vw, 56px); margin: 0 !important; }
.ak-research-head .ak-photo-frame { max-width: 260px; margin-inline: auto 0 !important; }
.ak-pub-card { gap: 12px !important; }
.ak-cards.is-3 > .wp-block-group { padding: clamp(24px, 2.6vw, 34px); }
.ak-pub-card h3 { font-size: clamp(1.2rem, .6vw + 1rem, 1.45rem) !important; line-height: 1.25 !important; letter-spacing: -0.02em; }
.ak-pub-card p { font-size: 1rem !important; }
.ak-pub-card h3 a { color: var(--ink); text-decoration: none; }
.ak-pub-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--coral); }
.ak-pub-card .ak-pub-venue { font-size: 1rem !important; font-style: italic; }
p.ak-pub-status {
	align-self: flex-start; display: inline-block; padding: 5px 13px 4px; border-radius: 999px; font-size: .85rem !important;
	font-weight: 500; background: var(--sun-soft); color: var(--ink) !important; line-height: 1.5;
}
p.ak-pub-status.is-review { background: var(--teal-soft); }
p.ak-pub-status.is-preprint { background: var(--coral-soft); }

/* Research page list (also used on /research/) */
.ak-pubs { display: flex; flex-direction: column; gap: 14px !important; }
.ak-pubs > * { margin: 0 !important; }
.ak-pub { background: var(--bg-2); border-radius: 20px; padding: 26px 28px; display: flex; flex-direction: column; gap: 8px; }
.ak-pub > * { margin: 0 !important; }
.ak-pub h3 { font-size: 1.35rem; line-height: 1.3; }
.ak-pub h3 a { color: var(--ink); text-decoration: none; }
.ak-pub-venue { color: var(--muted); font-style: italic; }
.ak-pub-desc { color: var(--text); font-size: 1rem; }
.ak-pub-links { font-size: .98rem; color: var(--muted); }
.ak-pub-links a { font-weight: 500; overflow-wrap: anywhere; }
.ak-pub p.ak-pub-status { align-self: flex-start; }
.ak-pub-note { color: var(--text); font-size: 1rem; }
.ak-pub h4.ak-findings-title { font-family: var(--font-body); font-size: .9rem; font-weight: 600; letter-spacing: .02em; color: var(--ink); margin-top: 6px !important; }
.ak-pub ul.ak-findings { margin: 0 !important; padding-left: 1.2em; font-size: 1rem; color: var(--text); }
.ak-pub ul.ak-findings li + li { margin-top: .3em; }
.ak-pub { scroll-margin-top: 16px; }

/* ---------- Awards (optional pattern) ---------- */
.ak-awards { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.ak-awards > * { margin: 0 !important; }
.ak-award { background: var(--bg-2); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.ak-award > * { margin: 0 !important; }
.ak-award-year { font-family: var(--font-head); font-size: 1.9rem !important; font-weight: 600; color: var(--coral); line-height: 1.1; }
.ak-award h3 { font-size: 1.2rem; }
.ak-award p:not(.ak-award-year) { color: var(--muted); font-size: .95rem; }

/* ---------- Contact ---------- */
.ak-contact > .wp-block-columns { align-items: center !important; gap: clamp(32px, 6vw, 80px); margin: 0 !important; }
.ak-contact .ak-photo-frame { max-width: 380px; }
.ak-contact-list { list-style: none; margin: 28px 0 0 !important; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ak-contact-list li { margin: 0; }
.ak-contact-list a {
	display: block; position: relative; padding: 16px 56px 16px 22px; border-radius: 18px; background: var(--bg-2);
	color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.08rem; overflow-wrap: anywhere;
	transition: transform .15s ease, box-shadow .15s ease;
}
.ak-contact-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--ink); }
.ak-contact-list a::after {
	content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
	width: 32px; height: 32px; border-radius: 50%; background: var(--coral); color: var(--on-coral);
	display: grid; place-items: center; font-size: 1rem;
}
.ak-contact-list strong { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); }

/* ---------- CV / Research long-form ---------- */
.ak-cv-section { border-top: 1px solid var(--border); padding-top: 32px !important; margin-top: 40px !important; }
.ak-cv-section > h2 { font-size: 1.8rem; margin-bottom: 20px !important; }
.ak-cv-item { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; margin-bottom: 24px !important; }
.ak-cv-item > * { margin: 0 !important; grid-column: 1; }
.ak-cv-item > .ak-cv-date { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ak-cv-item h3 { font-size: 1.3rem; }
.ak-cv-item .ak-cv-sub { color: var(--muted); font-style: italic; }
.ak-cv-item ul { margin-top: 8px !important; padding-left: 1.2em; color: var(--text); }

.ak-band .ak-contact-list a { background: var(--bg); }

/* ---------- Latest posts block ---------- */
.ak-latest .post-grid { margin-top: 0; }
.ak-band .post-card, .ak-band .post-card:hover { background: var(--bg); }
.ak-band .post-card__media { background: var(--bg-3); }
.ak-latest .ak-view-all { margin-top: 36px !important; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.ak-cards.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ak-dse { grid-template-columns: 1fr; }
	.ak-dse > figure.wp-block-image { order: 0; }
}
@media (max-width: 680px) {
	.ak-cards, .ak-cards.is-3 { grid-template-columns: 1fr; }
	.ak-stats { grid-template-columns: 1fr 1fr; }
	.ak-research-head .ak-photo-frame { display: none !important; }
	.ak-about .ak-photo-frame, .ak-contact .ak-photo-frame { max-width: 300px; width: calc(100% - 40px); }
	.ak-cv-item { grid-template-columns: 1fr; }
	.ak-cv-item > .ak-cv-date { grid-column: 1; grid-row: auto; }
}
