/* -------------------------
   Design tokens
-------------------------- */
:root{
  --bg: #0b1020;
  --bg2:#070b16;
  --text:#e7e9ee;
  --muted:#a7adbb;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --border: rgba(255,255,255,.12);
  --accent:#4fd1ff;
  --accent2:#7c5cff;
  --shadow: 0 24px 60px rgba(0,0,0,.45);
  --shadow2: 0 16px 40px rgba(0,0,0,.35);

  --radius: 18px;
  --radius2: 999px;
  --max: 1100px;
}

body[data-theme="light"]{
  --bg:#f6f7fb;
  --bg2:#ffffff;
  --text:#0b1020;
  --muted:#4a5568;
  --card:#ffffff;
  --card2:#f2f4f8;
  --border:#e6e9f1;
  --shadow: 0 18px 50px rgba(5,10,25,.12);
  --shadow2: 0 12px 34px rgba(5,10,25,.10);
}

/* -------------------------
   Base / layout
-------------------------- */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
  color:var(--text);
  line-height:1.6;
}

.container{
  width:100%;
  max-width: var(--max);
  margin:0 auto;
  padding:0 20px;
}


/* -------------------------
   Topbar
-------------------------- */
.topbar{
  position:sticky;
  top:0;
  z-index:30;
  border-bottom: 1px solid var(--border);
  background: rgba(8,10,18,.58);
  backdrop-filter: blur(12px);
}
body[data-theme="light"] .topbar{
  background: rgba(255,255,255,.72);
}

.topbar__inner{
  height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
  font-weight:650;
  letter-spacing:.2px;
}
.brand__mark{
  width:12px; height:12px; border-radius:999px;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(79,209,255,.12);
}

.nav{ display:flex; gap:14px; }
.nav a{
  color:var(--muted);
  text-decoration:none;
  padding:8px 10px;
  border-radius:12px;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover{
  background: rgba(255,255,255,.06);
  color:var(--text);
}

.topbar__actions{ display:flex; align-items:center; gap:10px; }

.iconbtn{
  width:40px; height:40px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.iconbtn:hover{
  transform: translateY(-1px);
  border-color: rgba(79,209,255,.45);
  background: rgba(255,255,255,.06);
}
#top{
    display: flex;
    align-items: center;
}
/* -------------------------
   Hero
-------------------------- */
.hero{ position:relative; padding: 64px 0 30px; }
.containter
.hero__grid{
  display:grid;
  grid-template-columns: 1.25fr .85fr;
  gap:28px;
  align-items:start;
}
@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
}

.tags{ display:flex; flex-wrap:wrap; gap:10px; margin:0 0 14px; }
.tag{
  font-size:.8rem;
  color:var(--muted);
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  padding:6px 10px;
  border-radius: var(--radius2);
}
.hero__left{
    display: flex;
    flex-direction: column;
    align-items: center;
}
h1{
  margin:0 0 14px;
  line-height:1.08;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  letter-spacing:-.02em;
}
.profile-pic{
    width: 100px;
    border-radius: 50%;    
}

.accent{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.lead{ margin:0 0 18px; color: var(--muted); font-size: 1.05rem; max-width: 62ch; }

.hero__cta{ display:flex; flex-wrap:wrap; gap:12px; margin: 16px 0 18px; }

.hero__stats{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 560px){
  .hero__stats{ grid-template-columns: 1fr; }
}

.stat__label{ color:var(--muted); font-size:.85rem; }
.stat__value{ font-weight:750; font-size:1.1rem; margin-top:2px; }
.stat__hint{ color:var(--muted); font-size:.85rem; margin-top:2px; }


/* -------------------------
   Cards / components
-------------------------- */
.card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow: var(--shadow2);
}
body[data-theme="light"] .card{
  background: rgba(255,255,255,.95);
}

.card--soft{
  background: rgba(255,255,255,.04);
  box-shadow:none;
}

.divider{
  height:1px;
  background: var(--border);
  margin:14px 0;
  opacity:.8;
}

.profile{ padding:18px; }
.profile__top{ display:flex; gap:12px; align-items:center; }
.avatar{
  width:44px; height:44px; border-radius:16px;
  background:
    radial-gradient(circle at 30% 30%, rgba(79,209,255,.9), rgba(124,92,255,.75));
  box-shadow: 0 10px 24px rgba(79,209,255,.15);
}
.profile__name{ font-weight:750; }
.profile__role{ color:var(--muted); font-size:.95rem; }

.profile__list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}
.profile__list li{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:var(--muted);
}
.profile__list strong{ color:var(--text); font-weight:650; }

.profile__links{ display:flex; flex-wrap:wrap; gap:10px; }

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius: var(--radius2);
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  text-decoration:none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.chip:hover{
  transform: translateY(-1px);
  border-color: rgba(79,209,255,.45);
  background: rgba(255,255,255,.06);
}

.micro{ font-size:.88rem; color:var(--muted); margin:12px 0 0; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 11px 16px;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  text-decoration:none;
  color:var(--text);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  font-weight:650;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.btn--primary{
  border:none;
  color:var(--muted);
  background: rgba(255,255,255,.04);
  
  
}
.btn--ghost:hover{
  border-color: rgba(79,209,255,.45);
  
 
}
.btn:hover{ outline: 3px solid rgba(79,209,255,.28);
  color: var(--text);
}
.btn:active{ transform: translateY(0); }
.btn:focus, .iconbtn:focus, .chip:focus, .nav a:focus, input:focus, textarea:focus{
  outline: 3px solid rgba(79,209,255,.28);
  outline-offset: 2px;
}
.icon {
  width: 18px;
  height: 18px;
  color: var(--text); /* blir svart/vit beroende på tema */
}

/* -------------------------
   Sections
-------------------------- */
.section{ padding: 46px 0; }
.section--alt{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}
.section__head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
}
.section__head h2{ margin:0; font-size:1.8rem; letter-spacing:-.01em; }
.muted{ color:var(--muted); }
h2, h3{ letter-spacing:-.01em; }
h3{ margin:0 0 10px; }

.twoCol{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:20px;
  align-items:start;
  width:100%;
}
@media (max-width: 980px){
  .twoCol{ grid-template-columns: 1fr; }
}

/* -------------------------
   Project toolbar + grid
-------------------------- */
.toolbar{
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.filters{ display:flex; flex-wrap:wrap; gap:10px; }

.filterBtn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--muted);
  padding:8px 12px;
  border-radius: var(--radius2);
  cursor:pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.filterBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(79,209,255,.45);
  background: rgba(255,255,255,.06);
  color:var(--text);
}
.filterBtn[aria-pressed="true"]{
  color: #06101a;
  border: none;
  background: linear-gradient(rgba(79,209,255,.45));
}

@media (max-width: 520px){
  .search input{ min-width: 200px; }
}

.grid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}
@media (max-width: 980px){ .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px){ .grid{ grid-template-columns: 1fr; } }

.project{
  position:relative;
  padding:16px;
  text-decoration:none;
  color:var(--text);
  overflow:hidden;
}
.project:hover{
  transform: scale(1.02);
}


.project__top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.project__title{ margin:0; font-size:1.08rem; font-weight:760; }
.project__meta{ color:var(--muted); font-size:.86rem; }
.project__desc{ margin:10px 0 12px; color:var(--muted); }

.tags{ display:flex; flex-wrap:wrap; gap:8px; }
.tag{
  padding: 6px 10px;
  border-radius: var(--radius2);
  font-size:.78rem;
  color:var(--text);
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
}
.tag--accent{
  border-color: rgba(79,209,255,.30);
  background: rgba(79,209,255,.10);
}

.project__actions{
  margin-top: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.link{
  display:inline-flex;
  gap:8px;
  align-items:center;
  color:var(--text);
  text-decoration:none;
  padding:8px 10px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.link:hover{
  transform: translateY(-1px);
  border-color: rgba(79,209,255,.45);
  background: rgba(255,255,255,.06);
}

/* -------------------------
   About bits
-------------------------- */
.bullets{ margin-top:14px; display:grid; gap:12px; }
.bullet{ padding:14px; }
.bullet__title{ font-weight:750; margin-bottom:4px; }
.bullet__text{ color:var(--muted); }

.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.list li{ margin: 8px 0; }
.list strong{ color: var(--text); }

.ctaRow{ display:flex; gap:12px; margin-top:14px; flex-wrap:wrap; }

/* -------------------------
   Contact
-------------------------- */

.contactCard{
  display:flex;
  align-items: center;
  padding:14px 16px;
  margin: 10px 0;
  flex-direction:column;
  border-radius: var(--radius);
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  text-decoration:none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}


.field{ display:grid; gap:8px; margin-top:12px; }
.field span{ color:var(--muted); font-size:.9rem; }
input, textarea{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  font: inherit;
}
.contactCard--form{
  width: 100%;
  max-width: none;
  padding: 18px;
  align-items: stretch; /* viktigt: så form fyller bredd */
}

/* Själva form-layouten */
.contactForm{
  width: 100%;
  display: grid;
  gap: 14px;
}

/* Ett fält (label + input) */
.contactField{
  display: grid;
  gap: 8px;
  margin: 0;   /* ta bort gamla margins */
  padding: 0;  /* ta bort gamla padding */
}

/* Label-texten */
.contactLabel{
  font-size: 0.90rem;
  color: var(--muted);
}

/* Inputs i kontaktformuläret */
.contactForm input,
.contactForm textarea{
  width: 100%;
  margin: 0;            /* dödar dina #emailInput/#messageInput-margins */
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  padding: 12px 12px;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

/* Textarea: snygg, kontrollerad */
.contactForm textarea{
  resize: none;
  min-height: 130px;
}

/* Focus state: premium */
.contactForm input:focus,
.contactForm textarea:focus{
  outline: none;
  border-color: rgba(79,209,255,.55);
  box-shadow: 0 0 0 4px rgba(79,209,255,.18);
  background: rgba(255,255,255,.06);
}

/* Placeholder: lite mjukare */
.contactForm input::placeholder,
.contactForm textarea::placeholder{
  color: rgba(167,173,187,.75);
}

/* Knappen: full width på mobil, auto på desktop */
.contactForm .btn{
  justify-self: end;
}
@media (max-width: 520px){
  .contactCard--form{ max-width: none; }
  .contactForm .btn{ width: 100%; justify-self: stretch; }
}

/* Liten hint-text under knappen */
.contactHint{
  margin: 0;
  min-height: 1.1em;
  font-size: .9rem;
  color: var(--muted);
}
/* -------------------------
   Footer
-------------------------- */
.footer{ padding: 34px 0 50px; }
.footer__inner{
  display:flex;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  border-top:1px solid var(--border);
  padding-top:18px;
}
