/* =========================
   Fonter og variabler
   ========================= */
:root {
  --main-bg: #fffdfc;
  --section-bg: #fffdfc;
  --accent: #e3b8b8;
  --button-bg: #f2f2f2;
  --button-hover: #e0e0e0;
  --text: #3c3c3c;
  --footer-text: #777;
  --border-radius: 16px;
  --max-width: 900px;
  --font-main: 'Quicksand', sans-serif;
  --font-title: 'Orange Kid', cursive;
}

@font-face {
  font-family: 'Orange Kid';
  src: url('fonts/orange%20kid.ttf') format('truetype'); /* mellomrom URL-encodet */
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =========================
   Base
   ========================= */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--main-bg);
  color: var(--text);
}

h1 { font-family: var(--font-title); }
h2, h3 { font-family: var(--font-main); } /* default */

/* =========================
   Seksjoner
   ========================= */
section {
  padding: 30px 30px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about, .about-page, .project-page {
  background-color: var(--section-bg);
  border-radius: var(--border-radius);
}

.back-link {
  display: inline-block;
  margin: 20px 0;
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
}
.back-link:hover { text-decoration: underline; }

/* =========================
   Om-seksjon
   ========================= */
.about-main {
  max-width: 650px;
  margin: 0 auto;
}
.about-main h1 {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 20px;
}
.about-main p {
  font-size: 19px;
  line-height: 2.0;
}

.headshot {
  width: 300px; height: 300px;
  border-radius: 50%;
  object-fit: cover;
}

.navn-tittel {
  width: 100%;
  text-align: center;
  font-size: 3rem;
  font-family: var(--font-title);
  color: var(--accent);
}

.intro-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.intro-tekst {
  max-width: 450px;
  font-size: 18px;
  line-height: 1.7;
}

/* =========================
   Prosjekter – felles
   ========================= */
.projects { padding-top: 0; }

.projects h2,
.project-page h2 {
  color: var(--accent);
  font-size: 25px;
  margin-bottom: 30px;
}

/* Forsiden: endre font på h2/h3 i prosjektseksjonen */
.projects h2,
.projects h3 {
  font-family: var(--font-title);
}

/* Prosjektsiden: behold standard (var(--font-main)) */
.project-page h2,
.project-page h3 {
  font-family: var(--font-main);
}

/* Liste/grid */
.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 32px;
}
@media (min-width: 700px) {
  .project-list { grid-template-columns: 1fr 1fr; }
}

/* Kort */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--section-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e7e7e7;
  box-shadow: 0 4px 8px rgba(64, 64, 64, 0.1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  min-height: 340px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(64, 64, 64, 0.12);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.project-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-info h3 {
  margin: 0 0 12px;
  font-size: 1.3em;
  color: var(--accent);
}
.project-info p {
  margin-bottom: 18px;
  font-size: 1em;
  color: #444;
}
.project-readmore {
  margin-top: auto;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: var(--accent);
}

/* Prosjektside – innhold */
.project-content {
  padding: 40px 30px;
  line-height: 1.7;
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto;
}
.project-content h1 {
  font-family: var(--font-title);
  color: var(--accent);
  font-size: 32px;
  margin-bottom: 20px;
}

.project-screenshot {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.project-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.project-text { flex: 1; }
.project-screenshot-beside {
  max-width: 300px;
  border-radius: 8px;
}

/* =========================
   Footer
   ========================= */
.footer {
  background-color: var(--section-bg);
  text-align: center;
  padding: 30px 20px;
  font-size: 14px;
  color: var(--footer-text);
}

.footer-icons {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

.icon {
  width: 26px; height: 26px;
  fill: var(--accent);
  transition: transform 0.3s ease;
}
.icon-link:hover .icon { transform: scale(1.15); }

/* =========================
   Animasjoner
   ========================= */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #636363;
  font-family: var(--font-title);
  font-size: 36px;
  color: var(--accent);
  width: 0;
  animation:
    typing 2.5s steps(10) forwards,
    blink 0.6s step-end 10,
    remove-cursor 0s 5s forwards;
}

@keyframes typing { from { width: 0; } to { width: 155px; } }
@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: #606060; }
}
@keyframes remove-cursor { to { border-right: none; } }

/* =========================
   Responsivt (mobil)
   ========================= */
@media (max-width: 600px) {
  .about-main { padding: 0 20px; font-size: 16px; }
  .footer { padding: 20px 15px; font-size: 13px; }
  .footer-icons { gap: 16px; }
  .icon { width: 24px; height: 24px; }
}