/*
Theme Name: Guðmundur Ármann
Theme URI: https://www.gudmundurarmann.is/
Author: Guðmundur Ármann
Description: Sérhannað, aðgengilegt og hraðvirkt WordPress-þema fyrir gudmundurarmann.is.
Version: 1.3.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: gudmundurarmann
*/

:root {
  --ink: #18231d;
  --muted: #58645d;
  --paper: #fbfaf6;
  --surface: #f0f3ed;
  --line: #d9ded7;
  --accent: #244a36;
  --accent-2: #a6673a;
  --white: #fff;
  --max: 1180px;
  --reading: 760px;
  --radius: 18px;
  --shadow: 0 16px 45px rgba(24,35,29,.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 18px; line-height: 1.65; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.wrap { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.reading { width: min(calc(100% - 40px), var(--reading)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 9999; background: var(--ink); color: #fff; padding: .6rem 1rem; }
.skip-link:focus { left: 10px; }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251,250,246,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(217,222,215,.8); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.site-nav { margin-left: auto; }
.site-nav > ul,
.site-nav .menu {
  display: flex !important;
  align-items: center;
  gap: 26px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.site-nav li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  white-space: nowrap;
}
.site-nav li::marker { content: ""; }
.site-nav a { display: inline-block; text-decoration: none; font-size: .92rem; font-weight: 650; white-space: nowrap; }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--accent-2); }
.menu-toggle { display: none; border: 1px solid var(--line); background: transparent; padding: .55rem .8rem; border-radius: 999px; }
.hero { padding: clamp(70px, 9vw, 128px) 0 clamp(60px, 8vw, 105px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .65fr); gap: clamp(40px, 8vw, 110px); align-items: end; }
.eyebrow { margin: 0 0 18px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 800; }
h1,h2,h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.08; letter-spacing: -.035em; margin-top: 0; }
h1 { font-size: clamp(3.05rem, 7vw, 6.6rem); max-width: 980px; margin-bottom: 30px; }
h2 { font-size: clamp(2.15rem, 4.2vw, 4rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.85rem); }
.lead { font-size: clamp(1.1rem, 2vw, 1.32rem); max-width: 800px; color: var(--muted); }
.hero-note { border-left: 3px solid var(--accent-2); padding: 6px 0 6px 26px; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; line-height: 1.45; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 20px; border-radius: 999px; font-weight: 750; text-decoration: none; border: 1px solid var(--accent); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #173325; color: #fff; }
.btn-secondary { background: transparent; color: var(--accent); }
.section { padding: clamp(68px, 8vw, 112px) 0; }
.section-soft { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 42px; }
.section-head h2 { margin-bottom: 0; max-width: 760px; }
.ga-post-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px;
  width: 100%;
}
.ga-post-card {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  float: none !important;
  flex: none !important;
  background: rgba(255,255,255,.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 315px;
  display: flex !important;
  flex-direction: column;
}
.ga-post-card:first-child { background: var(--white); box-shadow: var(--shadow); }
.ga-post-card .meta, .post-meta { color: var(--muted); font-size: .82rem; }
.ga-post-card h3 { overflow-wrap: anywhere; }
.ga-post-card h3 a { text-decoration: none; }
.ga-post-card .excerpt { color: var(--muted); }
.ga-post-card .more { margin-top: auto; font-weight: 750; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.topic { padding: 30px; min-height: 250px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; }
.topic-num { color: var(--accent-2); font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.topic p { color: var(--muted); }
.statement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 100px); }
.page-hero { padding: 74px 0 52px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.8rem, 6vw, 5.6rem); margin-bottom: 18px; }
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card { border-top: 1px solid var(--line); padding: 28px 0 10px; }
.post-card h2 { font-size: clamp(1.7rem,3vw,2.4rem); margin-bottom: 12px; }
.post-card h2 a { text-decoration: none; }
.entry-content { font-size: 1.04rem; }
.entry-content > * { max-width: var(--reading); margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--max); }
.entry-content > .alignfull { max-width: none; }
.entry-content p { margin-block: 1.25em; }
.entry-content h2 { margin-top: 1.65em; font-size: clamp(1.8rem,4vw,2.8rem); }
.entry-content h3 { margin-top: 1.5em; }
.entry-content blockquote { border-left: 4px solid var(--accent-2); padding-left: 26px; font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; }
.entry-content a { color: var(--accent); }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; }
.site-footer { margin-top: 40px; padding: 50px 0; border-top: 1px solid var(--line); background: #f6f5f0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 35px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { text-decoration: none; }
.small { font-size: .82rem; color: var(--muted); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #d48a52; outline-offset: 4px; }
@media (max-width: 900px) {
  body { font-size: 17px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 81px; left: 0; right: 0; background: var(--paper); padding: 24px 20px 30px; border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav > ul, .site-nav .menu { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-grid, .statement-grid { grid-template-columns: 1fr; }
  .ga-post-grid, .topic-grid { grid-template-columns: 1fr !important; }
  .archive-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  h1 { font-size: clamp(2.8rem, 15vw, 5rem); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* v1.1.0 hardening against legacy/plugin CSS */
.site-header .header-inner { width: min(calc(100% - 40px), var(--max)); }
.site-header .site-title { flex: 0 0 auto; }
.site-header .site-nav { flex: 0 0 auto; }
.ga-post-grid > .ga-post-card { box-sizing: border-box !important; }

/* v1.2.0 live-site polish */
.hero h1 {
  font-size: clamp(3.15rem, 6.35vw, 6.15rem);
  max-width: 12.8ch;
}
.ga-post-card .excerpt,
.ga-post-card .excerpt *,
.entry-content,
.entry-content * {
  overflow-wrap: anywhere;
  word-break: normal;
}
.ga-post-card .excerpt a,
.entry-content a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Archive readability and rhythm */
.archive-hero h1 { max-width: 16ch; }
.post-list article { min-width: 0; }
.post-list .entry-summary,
.post-list .entry-summary * {
  overflow-wrap: anywhere;
}


/* v1.3.0 final production audit */
.hero h1 { font-size: clamp(3rem, 5.9vw, 5.75rem); max-width: 12.6ch; }

.ga-post-card .excerpt { overflow: hidden; }
.ga-post-card .excerpt p { margin-top: .8rem; }

.archive-tools {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; margin-bottom: 34px; padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.archive-tools .search-form { display: flex; gap: 8px; width: min(100%, 420px); }
.archive-tools .search-field {
  width: 100%; min-height: 46px; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; background: #fff; color: var(--ink);
}
.archive-tools .search-submit {
  min-height: 46px; border: 1px solid var(--accent); border-radius: 999px;
  padding: 8px 16px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer;
}
.post-card .entry-summary { color: var(--muted); }

.about-intro { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(42px, 8vw, 110px); align-items: start; }
.about-intro .lead { margin-top: 0; }
.about-blocks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.about-block { padding: clamp(28px,4vw,44px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.about-block h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); margin-bottom: 16px; }
.about-block p:last-child { margin-bottom: 0; }
.about-kicker { color: var(--accent-2); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.about-quote { margin-top: 36px; border-left: 3px solid var(--accent-2); padding-left: 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.2rem,2vw,1.5rem); }

.site-footer .menu { margin: 0; padding: 0; list-style: none; }
.site-footer .menu li { margin: 0; padding: 0; list-style: none; }

@media (max-width: 900px) {
  .about-intro, .about-blocks { grid-template-columns: 1fr; }
  .archive-tools { align-items: stretch; flex-direction: column; }
  .archive-tools .search-form { width: 100%; }
}
