@media only screen and (max-width: 768px) {
  :root {
    --main-bg: #FAF7F3;
    --secondary-bg: #F0E4D3;
    --accent: #DCC5B2;
    --accent-dark: #D9A299;
    --link: #8B4513;
    --text-dark: #2C1810;
    --text-sm: 11px;
    --text-base: 14px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;
  }

  * {
    scroll-behavior: smooth;
  }

  body {
    font-family: "Poppins", sans-serif;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--main-bg);
    color: var(--text-dark);
    font-size: var(--text-base);
    line-height: 1.4;
    padding-top: 60px;
  }

  main {
    padding: 0 5vw 100px;
    min-height: calc(100vh - 100px);
  }

  /* Mobile Navigation */
  .topnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--secondary-bg);
    z-index: 1000;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--accent);
    box-sizing: border-box;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--secondary-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--accent);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    list-style: none;
    border-bottom: 1px solid var(--accent);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: var(--text-base);
    padding: 1rem;
    display: block;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background-color: var(--accent);
    color: var(--text-dark);
  }

  .topnav .logo {
    color: var(--accent-dark);
    font-size: var(--text-2xl);
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .topnav .logo:hover {
    color: var(--link);
  }

  .icon {
    display: block;
    color: var(--text-dark);
    font-size: var(--text-xl);
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .icon:hover {
    color: var(--accent-dark);
  }

  .bx.bxs-data {
    font-size: var(--text-3xl);
  }

  /* Section display control */
  .section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  .section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  /* Hero section */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 60px 20px;
    background-color: var(--main-bg);
    min-height: 50vh;
    text-align: center;
  }

  .hero h1 {
    font-size: var(--text-xl);
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.2;
  }

  .hero h2 {
    font-size: var(--text-lg);
    font-style: italic;
    font-weight: lighter;
    margin-top: 5px;
    color: var(--link);
    line-height: 1.3;
  }

  .titel {
    display: flex;
    font-size: var(--text-xl);
    font-weight: bold;
    gap: 5px;
    padding: 0px 15px;
    margin-bottom: 25px;
    color: var(--text-dark);
    justify-content: center;
  }

  .beskrivelse {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }

  .beskrivelse img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--accent);
  }

  .beskrivelse p {
    font-size: var(--text-base);
    color: var(--text-dark);
    margin: 0;
  }

  .projekter {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }

  .opgave {
    background-color: var(--secondary-bg);
    border: 2px solid var(--accent-dark);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  .opgave:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--link);
  }

  .opgave h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: var(--text-lg);
  }

  .resume {
    font-size: var(--text-sm);
    color: var(--text-dark);
    line-height: 1.4;
  }

  .teknologi {
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--link);
    font-weight: 500;
  }

  /* Mobile Timeline Styles */
  .timeline-container {
    padding: 0 15px;
  }

  .timeline {
    position: relative;
    padding: 15px 0;
  }

  .timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-dark), var(--accent));
  }

  .timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .timeline-item:hover {
    transform: translateX(3px);
  }

  .timeline-marker {
    position: absolute;
    left: -40px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid var(--secondary-bg);
    transition: all 0.3s ease;
    z-index: 1;
  }

  .timeline-marker.current {
    background-color: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(217, 162, 153, 0.3);
    animation: pulse-mobile 2s infinite;
  }

  @keyframes pulse-mobile {
    0% {
      box-shadow: 0 0 0 3px rgba(217, 162, 153, 0.3);
    }
    50% {
      box-shadow: 0 0 0 6px rgba(217, 162, 153, 0.1);
    }
    100% {
      box-shadow: 0 0 0 3px rgba(217, 162, 153, 0.3);
    }
  }

  .timeline-item:hover .timeline-marker {
    transform: scale(1.1);
    background-color: var(--link);
  }

  .timeline-content {
    background-color: var(--secondary-bg);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid var(--accent);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  .timeline-item:hover .timeline-content {
    border-color: var(--accent-dark);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15);
  }

  .timeline-content h3 {
    margin: 0 0 5px 0;
    font-size: var(--text-lg);
    color: var(--text-dark);
    font-weight: bold;
    line-height: 1.2;
  }

  .timeline-content h4 {
    margin: 0 0 8px 0;
    font-size: var(--text-base);
    color: var(--link);
    font-weight: 500;
    font-style: italic;
  }

  .timeline-date {
    display: block;
    font-size: var(--text-sm);
    color: var(--accent-dark);
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
  }

  .timeline-location {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-dark);
    opacity: 0.7;
    line-height: 1.3;
  }

  .timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    background-color: var(--main-bg);
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid var(--accent);
  }

  .timeline-details.active {
    max-height: 150px;
    padding: 12px;
  }

  .timeline-details p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-dark);
    line-height: 1.4;
  }

  .kontakt {
    font-size: var(--text-2xl);
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 20px 0;
    background-color: var(--secondary-bg);
    position: fixed;
    bottom: 0;
    left: 0;
  }

  .kontakt i {
    transition: all 0.3s ease;
    color: var(--accent-dark);
    margin: 0 10px;
  }

  .kontakt i:hover {
    transform: translateY(-4px) scale(1.1);
    color: var(--link);
  }

  a {
    text-decoration: none;
    color: var(--text-dark);
  }

  .evner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }

  .evner-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .evner h4 {
    color: var(--text-dark);
    font-size: var(--text-lg);
    text-align: center;
    margin: 0;
  }

  .evner ul {
    background-color: var(--secondary-bg);
    border: 2px solid var(--accent-dark);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .evner li {
    color: var(--text-dark);
    margin-bottom: 0;
    font-size: var(--text-base);
    text-align: center;
    background-color: var(--main-bg);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .evner li i {
    font-size: var(--text-lg);
    color: var(--link);
  }
}