:root {
  --red: #a61909;
  --red-dark: #7a1206;
  --ink: #1d1d1f;
  --muted: #5f5f66;
  --paper: #ffffff;
  --soft: #f5f2f0;
  --line: #e4dfdc;
  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

body {
  margin: 0;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--red); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 900; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  padding: .75rem 1.25rem;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header nav { display: flex; gap: clamp(.75rem, 3vw, 1.75rem); }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-header nav a:hover { color: var(--red); }

/* ----- Hero ----- */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr;
  min-height: clamp(460px, 72vh, 680px);
  background: var(--red); color: #fff;
}
.hero-text {
  align-self: center; justify-self: end;
  width: min(100%, 36rem);
  padding: 3rem clamp(1.25rem, 5vw, 4rem);
}
.hero-img { min-width: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 5.5rem); font-weight: 900; text-transform: uppercase; margin-bottom: .2em; text-wrap: balance; }
.hero-sub { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; margin: 0 0 1.6rem; max-width: 22rem; }

.button {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px;
  background: #fff; color: var(--red); font-weight: 700; text-decoration: none;
}
.button:hover { background: var(--ink); color: #fff; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-img { order: -1; }
  .hero-img img { height: auto; aspect-ratio: 4 / 4.2; object-position: 50% 18%; }
  .site-header { justify-content: center; }
  .hero-text { justify-self: stretch; width: auto; padding: 2rem 1.25rem 2.5rem; }
}

/* ----- Um mig ----- */
.about-grid { display: grid; gap: 2.5rem; }
.about-img img { border-radius: 6px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; }
.prose { max-width: 42rem; }
.prose p { margin: 0 0 1.1em; }
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 380px 1fr; align-items: start; gap: 4rem; }
  .about-img { position: sticky; top: 5rem; }
}

/* ----- Greinar ----- */
.articles { background: var(--soft); }
.article-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.article a {
  display: flex; flex-direction: column; height: 100%;
  padding: 1.5rem; border-radius: 6px;
  background: var(--paper); color: var(--ink); text-decoration: none;
  border-top: 4px solid var(--red);
  transition: transform .15s ease, box-shadow .15s ease;
}
.article a:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
.article h3 { font-size: 1.25rem; font-weight: 700; }
.article p { margin: 0; color: var(--muted); font-size: .98rem; }
.article .meta { margin-bottom: .6rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.article .meta span { color: var(--red); font-weight: 700; }

.more { margin: 2rem 0 0; }
.button-red { background: var(--red); color: #fff; }
.year { font-size: 1.4rem; margin: 2.5rem 0 1rem; }
.year:first-child { margin-top: 0; }

/* ----- Undirsíða ----- */
.page-head { background: var(--red); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; text-transform: uppercase; margin: 0; }
.site-header nav a[aria-current="page"] { color: var(--red); font-weight: 700; }

/* ----- Hafa samband ----- */
.contact { background: var(--red); color: #fff; }
.contact a { color: #fff; }
.lead { font-size: 1.2rem; max-width: 38rem; margin: 0 0 2rem; }
.contact-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .contact-list { grid-template-columns: 1fr 1fr; } }
.contact-list a {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.25rem; border-radius: 10px;
  background: var(--red-dark); text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.contact-list a:hover { background: var(--ink); transform: translateY(-2px); }
.contact-list .icon {
  flex: none; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: #fff; color: var(--red);
}
.contact-list .icon svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-list .icon-letter { font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; }
.contact-list .text { min-width: 0; display: grid; }
.contact-list .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.contact-list .value { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }

/* ----- Footer ----- */
.site-footer { padding: 1.5rem 1.25rem; text-align: center; font-size: .9rem; color: var(--muted); }
.site-footer p { margin: 0; }

a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.contact a:focus-visible, .hero a:focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .article a, .contact-list a { transition: none; }
}
