/* ===========================================================
   Nord CV — theme.css
   New Nordic editorial CV. All colors come from CSS variables
   set in functions.php → nord_cv_dynamic_css().
   =========================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--ink); color: var(--paper); }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

.nord-cv-skip {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.nord-cv-skip:focus {
  left: 1rem; top: 1rem; width: auto; height: auto;
  background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 100;
}

.container { width: 100%; max-width: var(--container, 1040px); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 768px) { .container { padding: 0 2.5rem; } }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
}

.hairline { height: 1px; background: var(--border); width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
.site-header__brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.125rem;
  letter-spacing: -.01em;
}
.custom-logo-link .custom-logo {
    max-height: 2.5rem !important;
    width: auto !important;
    max-width: 200px !important;
}
.site-header__nav { display: none; gap: 2rem; font-size: .875rem; }
@media (min-width: 768px) { .site-header__nav { display: flex; } }
.site-header__nav a { color: var(--muted); transition: color .25s ease; position: relative; }
.site-header__nav a:hover, .site-header__nav a.is-active { color: var(--ink); }
.site-header__nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  height: 1px; width: 100%; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s ease;
}
.site-header__nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: .5rem; margin-right: -.5rem;
  color: var(--ink); cursor: pointer;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }

.mobile-nav {
  position: fixed; inset: 0; z-index: 60;
  background: var(--paper);
  display: none; flex-direction: column;
  padding: 5rem 2rem 2rem;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav__close { position: absolute; top: 1rem; right: 1rem; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink); }
.mobile-nav nav { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }
.mobile-nav nav a { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
@media (min-width: 640px) { .section { padding: 7rem 0; } }
@media (min-width: 768px) { .section { padding: 10rem 0; } }

.section--hero { padding-top: 8rem; padding-bottom: 5rem; }
@media (min-width: 640px) { .section--hero { padding-top: 10rem; padding-bottom: 7rem; } }
@media (min-width: 768px) { .section--hero { padding-top: 14rem; padding-bottom: 10rem; } }

/* ---------- Hero ---------- */
.hero__grid {
  display: grid; gap: 2.5rem;
}
@media (min-width: 768px) {
  .hero__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4rem; align-items: end; }
}
.hero__text { order: 2; }
.hero__media { order: 1; max-width: 18rem; }
@media (min-width: 768px) {
  .hero__text { order: 1; grid-column: span 8; }
  .hero__media { order: 2; grid-column: span 4; max-width: none; }
}
.hero__headline {
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.hero__headline em { font-style: italic; color: var(--muted); }
.hero__intro {
  margin-top: 2.5rem; max-width: 36rem; color: var(--muted);
  font-size: 1rem; line-height: 1.7;
}
@media (min-width: 768px) { .hero__intro { font-size: 1.125rem; } }
.hero__cta { margin-top: 2.5rem; display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 640px) { .hero__cta { flex-direction: row; gap: 1rem; flex-wrap: wrap; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; padding: 0 1.75rem;
  font-family: 'Inter', sans-serif; font-size: .9375rem; font-weight: 500;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.btn--primary { background: var(--accent); color: var(--paper); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--paper); }
@media (max-width: 639px) { .btn { width: 100%; } }

.hero__portrait {
  aspect-ratio: 4 / 5;
  background: color-mix(in srgb, var(--border) 60%, var(--paper));
  overflow: hidden; border-radius: 4px;
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero__location { margin-top: 1rem; }

/* ---------- About / Skills / Contact two-column ---------- */
.split { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .split { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5rem; } }
.split__head { grid-column: span 12; }
.split__body { grid-column: span 12; }
@media (min-width: 768px) {
  .split__head { grid-column: span 4; }
  .split__body { grid-column: span 8; }
}
.split__title { margin-top: 1.25rem; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2; }
.about__copy p + p { margin-top: 1.25rem; }
.about__copy { color: color-mix(in srgb, var(--ink) 80%, var(--paper)); font-size: 1rem; line-height: 1.75; }
@media (min-width: 768px) { .about__copy { font-size: 1.125rem; } }

/* ---------- Experience ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { border-top: 1px solid var(--border); padding: 2rem 0; display: grid; gap: .75rem; }
.timeline > li:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 768px) {
  .timeline > li { grid-template-columns: 3fr 9fr; gap: 3rem; padding: 3rem 0; }
}
.timeline__year { padding-top: .25rem; }
.timeline__role { font-size: clamp(1.5rem, 2.5vw, 1.875rem); line-height: 1.3; }
.timeline__company { color: var(--muted); display: block; }
@media (min-width: 640px) { .timeline__company { display: inline; } .timeline__company::before { content: " — "; } }
.timeline__desc { margin-top: 1rem; max-width: 42rem; color: var(--muted); }

/* ---------- Skills ---------- */
.skills__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 640px) { .skills__grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.skills__group p.eyebrow { margin-bottom: 1.25rem; }
.skills__group ul { list-style: none; margin: 0; padding: 0; }
.skills__group li { padding: .375rem 0; }

/* ---------- Work ---------- */
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list > li { border-top: 1px solid var(--border); }
.work-list > li:last-child { border-bottom: 1px solid var(--border); }
.work-list a {
  display: grid; gap: .5rem;
  padding: 1.5rem 0;
  transition: color .25s ease;
}
@media (min-width: 768px) {
  .work-list a { grid-template-columns: 5fr 5fr 2fr; gap: 3rem; padding: 2.5rem 0; align-items: baseline; }
}
.work-list__title { font-size: clamp(1.5rem, 2.5vw, 1.875rem); transition: color .25s ease; }
.work-list a:hover .work-list__title { color: var(--muted); }
.work-list__desc { color: var(--muted); }
.work-list__meta { display: flex; align-items: center; gap: .5rem; }
@media (min-width: 768px) { .work-list__meta { justify-content: flex-end; } }
.work-list__row-mobile { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
@media (min-width: 768px) { .work-list__row-mobile .work-list__meta { display: none; } }

/* arrow icon (CSS-only) */
.arrow {
  display: inline-block; width: .8em; height: .8em;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s ease;
}
.work-list a:hover .arrow { transform: rotate(45deg) translate(2px, -2px); }

/* ---------- Contact ---------- */
.contact__email {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  word-break: break-all;
  position: relative;
}
.contact__email::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  height: 1px; width: 100%; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s ease;
}
.contact__email:hover::after { transform: scaleX(1); transform-origin: left; }

.contact__location-text a,
.contact__list dd a {
  position: relative;
}
.contact__location-text a::after,
.contact__list dd a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  height: 1px; width: 100%; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s ease;
}
.contact__location-text a:hover::after,
.contact__list dd a:hover::after { transform: scaleX(1); transform-origin: left; }

.contact__list { display: grid; gap: 2rem; }
.contact__list dt { margin-bottom: .5rem; }
.contact__list dd { margin: 0; font-size: 1.125rem; }
.contact__socials { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.contact__socials a { position: relative; }
.contact__socials a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  height: 1px; width: 100%; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s ease;
}
.contact__socials a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.site-footer__inner {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  gap: .75rem; padding: 2.5rem 0;
  font-size: .75rem; color: var(--muted);
}
@media (min-width: 768px) { .site-footer__inner { flex-direction: row; align-items: center; } }
