/* ================== Global ================== */
body {
    margin: 0;
    overflow-x: hidden;
    font-family: "Raleway", sans-serif;
}

p a, li a {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

p a:hover, li a:hover {
    color: #D7D7D6;
    text-decoration: underline;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;    
}

/* ================== Header ================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  padding: 0.5rem 1rem;
}

.navbar .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.5rem 1rem;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  height: 35px;
  border: none;
  background: #272B36;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
  box-sizing: border-box;
  transition: background 0.3s;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #D7D7D6;
  border-radius: 2px;
  gap: 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-menu {
  position: absolute;
  display: none;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 100%; 
  left: 0;
  width: 100%; 
  background-color: #272B36;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 999;
}

.nav-menu li a {
  display: block;
  padding: 1rem;
  color: #D7D7D6;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Visa menyn när aktiv */
.nav-menu.active {
  display: flex;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}


/* ================== Hero ================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh; 
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 15px;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; 
}

.hero-text {
    position: absolute;
    bottom: auto;
    top: 78%;
    right: 6%;
    z-index: 2;
    text-align: right;
    color: white;
    padding: 10px 15px;                 
    background-color: rgba(0, 0, 0, 0.5); 
    border-radius: 8px;
    display: inline-block;
    line-height: 1.2;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin: 0;
    font-family: 'Great Vibes', cursive;
    color: #D7D7D6;
}

.hero-text h2 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 400;
    font-family: railway, sans-serif;
    color: #D7D7D6;
}

/* ================== Om-mig ================== */
#about {
    background-color: #A08A81;
    line-height: 1.6;
    padding: 25px 20px;
}

    #about .row {
        gap: 40px;
    }

     #about .col-sm:first-child {
        line-height: 1.7;
    }

     #about .col-sm:last-child {
        line-height: 1.5;
    }

     #about .col-sm:last-child p {
        display: flex;
        align-items: flex-start;
        gap: 15px;     
        margin-bottom:34px;
    }

     #about .col-sm:last-child i {
        font-size: 1.5rem;           
        flex-shrink: 0;
        line-height: 1;
        margin-top: 0.4rem;
    }

.main-text {
    font-size: 1.2rem;
}

/* ================== Projektkort ================== */
.project-card {
    border-radius: 15px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.project-card .card-img-top {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    object-fit: cover;
    height: 200px;
}

.card-body {
    background-color: #D7D7D6;
}

#projects {
    background-color: #B7B8BB;
    padding-bottom: 60px;
}

#projects h2 {
    color: #272B36;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.project-card .card-title a {
    text-decoration: none;
    color: #000;
}

.project-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
    color: white;
    transition: opacity 0.3s;
}

.project-tag i {
    margin-right: 4px;
}

.project-tag:hover {
    opacity: 0.8;
}

a.btn {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
}

a.btn.github-btn {
    background-color: #272B36;
    color: #D7D7D6;
     transition: background-color 0.3s, color 0.3s;
}

a.btn.github-btn:hover {
    background-color: black;
    color: white;
}

a.btn.demo-btn {
    background-color: #D7D7D6;       
    color: #272B36;            
    border: 2px solid #272B36;
    transition: all 0.3s;          
}

a.btn.demo-btn:hover {
    background-color: #272B36;     
    color: white;                  
    border-color: #272B36;
}

.project-tag.html { background-color: #e34c26; }
.project-tag.css { background-color: #1572b6; }
.project-tag.js { background-color: #f7df1e; color: black; }
.project-tag.ts { background-color: #3178c6; }
.project-tag.bootstrap { background-color: #563d7c; }
.project-tag.scss { background-color: #cc6699; }

/* ================== Kunskaper ================== */
.skill-section {
    background-color: #A08A81;
    padding: 50px 20px; 
}

#skills h2 {
    color: #272B36;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.skill-section h3.h3-border {
    border-bottom: 2px solid #272B36;
    padding-bottom: 5px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.skills-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 10px;
    width: 100%;
    min-height: 100px;
    margin-bottom: 15px;
    background-color: #D7D7D6;
    border-radius: 12px;
    font-size: 1rem;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;   
}

.brand-item.html {
    color: #e34c26;
}

.brand-item.css {
    color: #1572b6;
}
.brand-item.bootstrap {
    color: #563d7c;
}

.brand-item.sass {
    color: #cc6699;
}

.brand-item.js {
    color: #f7df1e;
}

.brand-item.ts {
    color: #3178c6;
}

.brand-item.react {
    color: #61dafb;
}

.brand-text.next.js {
    color: black;
}

.brand-item.node {
    color: #47A248;
}

.brand-item.express {
    color: #000;
}

.brand-item.git {
    color: #f34f29;
}

.brand-item.github {
    color: #333;
}

.brand-item.figma { 
    color: #f24e1e;
}

.brand-item.tailwind {
    color: #38bdf8;
}

.skills-items:hover {
    scale: 1.05;
}

.brand-item {
    font-size: 1.25rem;
}

.row.mb-4 {
    margin-bottom: 2rem;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 100;
    line-height: 1;      
}

.skill-name {
    font-size: 1.1rem;
    text-align: center;
}

/* ================== Footer ================== */
footer {
    background-color: #272B36;
    color: #D7D7D6;
    padding: 40px 20px;
}

footer .footer-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
}

footer .contact-info {
    text-align: left;
    max-width: 400px; 
    margin: 0 auto 30px auto; 
    font-size: 1.1rem;
    line-height: 1.6;
}

#contact {
    padding: 25px 20px;
    gap: 20px;
}

footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    font-size: 2rem;
}

footer .social-icons a {
    color: #D7D7D6;
    transition: transform 0.2s, color 0.2s;
}

footer .social-icons a:hover {
    transform: scale(1.2); 
    color: white;
}

.animated-element {
    color: black;
    animation-name: connect;
    animation-duration: 4s;
    animation-iteration-count: infinite;
}

@keyframes connect {
    from {color: black;}
    to {color: white;}
}

/* ================== Padding för alla sektioner ================== */
#about, #projects, #skills, #contact {
    padding-top: 40px;
}

/* ================== Media Queries: Tablet ================== */
@media screen and (min-width: 768px) {
    /* Header: full bredd, ingen padding ovanför */
    header {
        width: 100%;
        padding: 0;
        background-color: #272B36;
    }

    .navbar .container {
        display: flex !important;
        align-items: center;
        justify-content: center !important;
        padding: 0;
    }

    /* Hamburgermeny - göms på tablet och uppåt */
    .hamburger {
        display: none;
    }

    /* Menyn visas som rad, tar hela bredden */
    .nav-menu {
        display: flex !important;
        justify-content: center !important;
        position: static;
        flex-direction: row;
        width: auto;
        background: #272B36;
        gap: 30px; /* mellan länkarna */
        margin: 0;
        padding: 0;
    }

    .nav-menu li a {
        display: block;
        padding: 1rem 0;
        color: #D7D7D6;
        text-decoration: none;
        text-transform: uppercase;
        text-align: center;
    }

    .nav-menu li a:hover {
        color: white;
        text-decoration: underline;
        background: none;
    }

    /* Hero-text */
    .hero-text {
        top: 75%;
        right: 4%;
        padding: 15px 20px;
    }

    .hero-text h1 {
        font-size: 4rem;
        text-shadow: 0 2px 5px rgba(0,0,0,0.2);
        letter-spacing: 1px;
    }

    .hero-text h2 {
        font-size: 1.8rem;
    }

    p {
        font-size: 1.2rem;
    }

    .main-text {
        font-size: 1.5rem;
    }

    #skills {
        padding: 40px 100px;
    }

    #projects {
        padding-bottom: 60px;
    }

    #contact {
        padding: 40px 100px;
    }

    .project-card .card-title a { font-size: 1.2rem; }
    .project-card .card-text { font-size: 0.95rem; }
    .project-card .btn-sm { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
}

/* ================== Media Queries: Laptop ================== */
@media screen and (min-width: 1200px) and (max-width: 1600px) {
    .hero-text h1 {
        font-size: 4.5rem;
    }
    .hero-text h2 {
        font-size: 2rem;
    }

    header {
        padding: 0;
    }

    .navbar .container {
        justify-content: center;
        padding: 0;
    }

    .nav-menu {
        gap: 50px;
        width: auto;
    }

    .hero-text {
        top: 40%;
        right: 5%;
        padding: 20px 25px;
    }

    .main-text {
        font-size: 1.5rem;
    }

    p {
        font-size: 1.2rem;
    }

     #projects {
        padding-bottom: 100px;
    }

    .project-card .card-title a { font-size: 1.4rem; }
    .project-card .card-text { font-size: 1rem; }
    .project-card .btn-sm { font-size: 0.9rem; padding: 0.5rem 1rem; }

    #skills > .container > .row:first-child,
    #skills > .container > .row:nth-child(2),
    #skills > .container > .row:nth-child(3) {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 20px;
    }
    
    .skills-items {
        min-height: 120px;
        margin-bottom: 0px;
    }

    .brand-item, .brand-text {
        font-size: 1.4rem;
    }
}

/* ================== Media Queries: Desktop ================== */

@media screen and (min-width: 1600px) {

    .hero-text h1 {
        font-size: 6rem;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }

    .hero-text {
        top: 45%;
        right: 5%;
        padding: 25px 30px;
    }
}









