* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f2f5f7;
}

.wrapper {
  max-width: 1000px;
  margin: 24px auto;
  padding: 0 12px;
}

.parent {
  display: grid;
  grid-template-columns: 0.5fr repeat(10, 1fr) 0.5fr;
  grid-template-rows: repeat(12, minmax(10px, auto));
  grid-column-gap: 0px;
  grid-row-gap: 0px;

  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  background: #fff;
}

/* Sektioner */
.header         { grid-area: 1 / 2 / 4 / 12;  background:#e9f4fb; }
.jobberfarenhet { grid-area: 4 / 2 / 7 / 12;  background:#ffffff; }
.utbildning     { grid-area: 7 / 2 / 9 / 12;  background:#f5fafe; }
.egenskaper { grid-area: 9 / 2 / 12 / 12; background:#ffffff;}
.personligtbrev        { grid-area: 12 / 2 / 13 / 12; background:#e9f4fb; }

/* Sidokolumner */
.sid1 { grid-area: 1 / 1 / 4 / 2;   background:#ffffff; }
.sid2 { grid-area: 4 / 1 / 7 / 2;   background:#e1f8e3; }
.sid3 { grid-area: 7 / 1 / 9 / 2;   background:#ffffff; }
.sid4 { grid-area: 9 / 1 / 13 / 2;  background:#e1f8e3; }
.sid5 { grid-area: 1 / 12 / 4 / 13; background:#ffffff; }
.sid6 { grid-area: 4 / 12 / 7 / 13; background:#e1f8e3; }
.sid7 { grid-area: 7 / 12 / 9 / 13; background:#ffffff; }
.sid8 { grid-area: 9 / 12 / 13 / 13;background:#e1f8e3; }
.sid9 { grid-area: 12 / 1 / 13 / 2; background:#ffffff; } 
.sid10{ grid-area: 12 / 12 / 13 / 13; background:#ffffff; } 
.header,
.jobberfarenhet,
.utbildning,
.footer {
  border-top: 1px solid rgba(0,0,0,.06);
}


/* ===== layout för innehållet i .header ===== */
.header-inner {
  display: flex;
  align-items: center;      
  justify-content: flex-start; 
  gap: 60px;                
  padding: 28px 36px;
}

.avatar {
  width: 120px;
  height: auto;  
  border-radius: 30px; 
  object-fit: contain;
}


.info {
  flex: 1;                   
}

.info h1 {
  margin: 0 0 6px 0;
  font-size: 36px;         
  font-weight: 800;
}

.info .role {
  margin: 0 0 14px 0;
  font-size: 14px;
  letter-spacing: 3px;
  font-weight: 700;
  color: #58626b;
}

.contact {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact li {
  font-size: 15px;
  position: relative;
  padding-left: 16px;
}
.contact li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  opacity: .7;
}
/* ===== Responsiv header ===== */

@media (max-width: 900px){
  .header-inner { gap: 36px; padding: 24px 28px; }
  .avatar { width: 150px; height: 150px; }
  .info h1 { font-size: 30px; }
  .info .role { letter-spacing: 2px; }
  .contact li { font-size: 14px; }
}

@media (max-width: 680px){
  .header-inner{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 20px 18px;
  }
  .avatar { width: 120px; height: 120px; }
  .info { flex: initial; width: 100%; }
  .info h1 { font-size: 26px; }
  .info .role { font-size: 12px; letter-spacing: 2px; margin-bottom: 10px; }

  .contact { align-items: center; gap: 6px; }
  .contact li { padding-left: 0; }
  .contact li::before { content: none; }
}

@media (max-width: 420px){
  .avatar { width: 100px; height: 100px; }
  .info h1 { font-size: 22px; }
  .contact li { font-size: 13px; }
}

/* ===== layout för innehållet i Jobberfarenhet ===== */
.jobberfarenhet {
  padding: 28px 36px;
}

.jobberfarenhet h2 {
  margin-bottom: 20px;
  font-size: 20px;
  color: #004080;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.experience {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.experience .year {
  font-weight: bold;
  color: #666;
  font-size: 14px;
}

.experience h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.experience p {
  margin: 0;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}
/* ===== Jobberfarenhet responsivt ===== */
@media (max-width: 680px) {
  .jobberfarenhet h2 {
    text-align: center; 
  }

  .experience {
    grid-template-columns: 1fr; 
    text-align: center;
  }

  .experience .year {
    margin-bottom: 6px;
    font-size: 14px;
    display: block;
    text-align: center; 
  }

  .experience h3 {
    font-size: 16px;
  }

  .experience p {
    font-size: 14px;
  }
}

/* ===== layout för innehållet i utbildning  ===== */
.utbildning {
  padding: 28px 36px;
}

.utbildning h2 {
  margin-bottom: 20px;
  font-size: 20px;
  color: #004080;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.edu {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.edu .year {
  font-weight: bold;
  color: #666;
  font-size: 14px;
}

.edu h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.edu p {
  margin: 0;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

/*=====  Responsivt –  jobberfarenhet ===== */
@media (max-width: 680px) {
  .utbildning h2 {
    text-align: center;
  }
  .edu {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .edu .year {
    margin-bottom: 6px;
    font-size: 14px;
    display: block;
    text-align: center;
  }
}

/* ===== layout för innehållet i egenskaper ===== */

.egenskaper {
  grid-area: 9 / 2 / 12 / 12;        
  background:#ffffff;
  padding: 28px 36px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.egenskaper h2{
  margin-bottom: 20px;
  font-size: 20px;
  color: #004080;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.egenskaper-grid{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.egenskaper .col h3{
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
}

.bullets{
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
  color:#333;
  font-size: 14px;
}

.contact-list{
  /* list-style: none; */
  margin: 0;
  padding: 0;
  line-height: 1.7;
  font-size: 14px;
}
.contact-list a{
  color: #1f2937;
  text-decoration: none;
}
.contact-list a:hover{
  text-decoration: underline;
}

.egenskaper .col + .col{
  border-left: 1px solid rgba(0,0,0,.1);
  padding-left: 24px;
}

/* ===== egenskaper responsivt ===== */
@media (max-width: 900px){
  .egenskaper-grid{ grid-template-columns: 1fr 1fr; }
  .egenskaper .col:nth-child(2){ border-left: 1px solid rgba(0,0,0,.1); }
}
@media (max-width: 640px){
  .egenskaper h2{ text-align: left; }  
  .egenskaper-grid{ grid-template-columns: 1fr; gap: 16px; }
  .egenskaper .col{ padding: 0; }
  .egenskaper .col::before{ display: none; }
  .contact-list{ text-align: left; }     
  .contact-list li{ padding-left: 0; }
  .contact-list li::before{ position: static; margin-right: 6px; }
}

/* ===== layout för innehållet i personlig brev ===== */
.personligtbrev { 
  padding: 28px 36px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.header,
.jobberfarenhet,
.utbildning,
.personligtbrev {
  border-top: 1px solid rgba(0,0,0,.06);
}

/* ===== layout för innehållet i menu===== */
.menu {
  margin-top: 20px;
  text-align: center;
}

.menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline-flex;
  gap: 24px;
}

.menu li a {
  text-decoration: none;
  color: #004080;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.menu li a:hover {
  background: #cfe8ff;
}
html {
  scroll-behavior: smooth;
}

/* ===== menu responsivt ===== */
@media (max-width: 600px) {
  .menu ul {
    gap: 12px;    
  }
  .menu li a {
    font-size: 10px;         
    padding: 4px 6px;      
  }
}

#toTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 50%;            
  background: rgba(0, 64, 128, 0.8); 
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  display: none;                  
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: background 0.3s ease, transform 0.2s ease;
}

#toTopBtn:hover {
  background: #004080;       
  transform: translateY(-3px);   
}

/* ===== layout för innehållet i peojects===== */
.projects {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}

.project {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
}

.project .year {
  font-weight: bold;
  color: #666;
  font-size: 14px;
}

.project h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
}

.project h3 a {
  text-decoration: none;
  color: #0b5bd3;
}
.project h3 a:hover {
  text-decoration: underline;
}

.project p {
  margin: 0;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

.projects h2{
  margin-bottom: 20px;
  font-size: 20px;
  color: #004080;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.links{
  margin-top: 8px;
}

.proj-link{
  position: relative;
  font-weight: 600;
  color: #004080;
  text-decoration: none;
  padding-bottom: 2px;           
}

.proj-link + .proj-link::before{
  content: "•";
  color: #9ca3af;
  margin: 0 10px 0 8px;
}

.proj-link::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: #cfe8ff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.proj-link:hover::after{
  transform: scaleX(1);
}

.proj-link .ext{
  margin-left: 6px;
  font-size: .9em;
  opacity: .7;
}
.project .links{
  margin-left: 18px;  
}

details > summary{
  display: inline-flex;             
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 4px 6px 4px 18px;         
  border-radius: 6px;
  cursor: pointer;
  color: #004080;
  font-weight: 600;
  background: transparent;
  transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}

details > summary:hover{
  background: #cfe8ff;
  box-shadow: 0 0 0 3px rgba(207,232,255,.5) inset;
}
details[open] > summary{
  background: #e9f4fb;
  color: #003366;
}

details > summary::marker,
details > summary::-webkit-details-marker{ display:none; }

details > summary::before{
  content:"";
  position:absolute;
  left:6px; top:50%;
  width:0; height:0;
  border-style:solid;
  border-width:5px 0 5px 7px;
  border-color:transparent transparent transparent #004080;
  transform:translateY(-50%) rotate(0deg);
  transition: transform .2s ease, border-left-color .2s ease;
}
details[open] > summary::before{
  transform:translateY(-50%) rotate(90deg);
}
details > summary:hover::before{
  border-left-color:#0b5bd3;
}


/* responsivt */
@media (max-width: 680px){
  .project { 
    grid-template-columns: 1fr;
    text-align: center;
  }
  .project .year { 
    text-align: center;
    margin-bottom: 6px;
  }
  .proj-link + .proj-link::before{
    margin: 0 8px;
  }
  .project .links{ 
      margin-left: 18px; 
  }
}