* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General Body and Font Styles */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #255203;
    color: #333;
    width: 100%;
    overflow-x: hidden;
}

/* Header */
header {
  background: url("leaves.jpg") no-repeat center center/cover;
  padding: 80px 20px 60px;
  text-align: center;
  color: #f4ede1;
  position: relative;
}

header img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid #f4ede1;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

header h1 {
  margin: 0;
  font-size: 2.8em;
}

header p {
  font-size: 1.2em;
  font-weight: 300;
}

/* Coin Flip */
.coin-container {
  width: 140px;
  height: 140px;
  perspective: 1000px;
  margin: 0 auto 20px;
}

.coin {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s;
}

.coin img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #f4ede1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
}

.coin img.back {
  transform: rotateY(180deg);
}

.coin-container:hover .coin {
  transform: rotateY(180deg);
}


/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    text-decoration: none;
}

.social-links i {
    font-size: 3rem;
    color: white;
    transition: transform 0.2s ease, color 0.2s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.social-links i:hover {
    transform: scale(1.2);
    color: #ebe485;
}

.social-links .devicon-linkedin-plain-wordmark {
    font-size: 5rem !important;
    position: relative;
    top: 10px;
}

/* Sticky Navbar */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(37, 82, 3, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    gap: 40px;
    flex-wrap: wrap;
}

.navbar a {
    color: #f4ede1;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.navbar a:hover {
    color: #ebe485;
}

/* Main Content Layout */
.main-content-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    flex-direction: column;
    align-items: center;
}

.main-sections {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Unified Activities bar (collapsible) */
.activities-wrapper {
    background-color: rgba(37, 82, 3, 0.95);
    color: #f4ede1;
    width: 100%;
    display: flex;
    flex-direction: column;
    
    border-radius: 0;
    padding: 10px 20px;
}

/* Collapsible toggle */
.activities-toggle {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

#toggle-activities {
    background-color: #3a7a02;
    color: #f4ede1;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#toggle-activities:hover {
    background-color: #2a5e01;
    transform: translateY(-2px);
}

/* Collapsed state */
.activities-wrapper.collapsed .activities-content {
    display: none;
}

/* Activities Content */
.activities-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
    flex-wrap: wrap;
    text-align: center;
}

/* Left side: Spotify */
.activity-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.activity-left h2 {
    margin: 0 0 8px;
}

/* Spotify song info */
#now-playing a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #f4ede1;
    flex-wrap: wrap;
    justify-content: center;
}

.song-artwork {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    max-width: 80%;
    height: auto;
}

.song-title {
    font-size: 0.9em;
    font-weight: bold;
}

.song-artist {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Right side: Twitch button */
.activity-right a {
    background-color: #6441a5;
    color: #fff;
    padding: 10px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.activity-right a:hover {
    background-color: #7d5bbe;
    transform: translateY(-2px);
}

.activity-right a.live {
    background-color: #e91916;
}

/* Sections */
.section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background-color: #e3d2b5;
}

.section .text {
  max-width: 600px;
  margin: 20px;
}

.section h2 {
  font-size: 2em;
  margin-bottom: 10px;
  color: black;
  text-align: center;
}

/* About Section Gif */
#about .text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.gif-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
}

#about .gif-small {
    display: block;
    width: 150px;
    height: auto;
    max-width: 80%;
}

/* Projects Section */
#projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #e3d2b5;
}

.project-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.project-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    max-width: 250px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Skills Section */
.skills {
    background-color: #255203;
    color: #f4ede1;
    text-align: center;
    padding: 40px 20px;
    width: 100%;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.badge {
    background-color: #2a5e01;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.95em;
    display: inline-block;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
    transform: scale(1.1);
    background-color: #3a7a02;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* Mobile Device Button */
.device-btn {
    display: none;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2a5e01;
    color: #f4ede1;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.device-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    background-color: #3a7a02;
}

#device-info {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2a5e01;
    color: #f4ede1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    white-space: pre-line;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 200px;
    text-align: center;
}

/* Footer Styles */
.footer {
    /* Basic styling */
    background-color: #141d05;
    color: white;
    padding: 1.5rem;
    margin-top: 2rem;
    /* Keep footer at bottom */
    width: 100%;
}

.footer-content {
    /* Center content and set max width */
    max-width: 1200px;
    margin: 0 auto;
    /* Arrange items */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    /* Space between links */
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    /* Link styling */
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    /* Hover effect */
    text-decoration: underline;
}

/* Make footer responsive */
@media (max-width: 768px) {
    .footer-content {
        /* Stack items on mobile */
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        /* Adjust spacing on mobile */
        gap: 1rem;
    }
}

@media (max-width: 1024px) {
    .navbar ul { flex-wrap: wrap; gap: 15px; }
    header h1 { font-size: 2.2em; }
}

@media (max-width: 768px) {
    header img, .coin-container { width: 120px; height: 120px; }
    .activities-content { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
    .activity-right { margin-top: 10px; }
    .project-card { max-width: 90%; }
    .song-artwork { width: 64px; height: 64px; }
}

@media (max-width: 480px) {
    header img, .coin-container { width: 100px; height: 100px; }
    header h1 { font-size: 1.8rem; }
    header p { font-size: 0.9rem; }
    .project-card { max-width: 95%; }
    .badge { width: 100%; text-align: center; }
    #toggle-activities { width: 90%; }
}

@media (max-width: 360px) {
    header h1 { font-size: 1.5rem; }
    header p { font-size: 0.8rem; }
    .social-links i { font-size: 1.5rem; }
    .device-btn { width: 95%; padding: 10px; font-size: 0.8rem; }
}
