:root {
    /* Light theme colors */
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-secondary: #555555;
    --text-muted: #888888;
    --nav-bg: #ffffff;
    --nav-border: lightgrey;
    --nav-text: grey;
    --nav-hover: #f2f2f2;
    --link-color: #00b3b3;
    --project-bg: #f8f9fa;
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --nav-bg: #1a1a1a;
    --nav-border: #333333;
    --nav-text: #b0b0b0;
    --nav-hover: #2a2a2a;
    --link-color: #4dd0e1;
    --project-bg: #222222;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    /* font-family: 'Merriweather', Georgia, 'Times New Roman', serif; */
    font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.005em;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-content {
    max-width: 950px;
    margin: 0 auto;
    padding: 20px 20px;
}

p {
    margin-bottom: 1.0em;
}

h1, h2, h3 {
    line-height: 1.3;
    letter-spacing: -0.01em;
    font-weight: 600;
}

h1 {
    font-size: 1.8em;
    margin-bottom: 0.3em;
}

h2 {
    font-size: 1.6em;
    margin-top: 1.5em;
    margin-bottom: 0.3em;
}

h3 {
    font-size: 1.1em;
    margin-top: 1.2em;
    margin-bottom: 0.3em;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 25px 0 5px 0;
    z-index: 1000;
    height: 45px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--nav-text);
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 3px;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--nav-hover);
    transform: scale(1.1);
}

/* Ensure the toggle sits on the right edge nicely when placed directly under nav container */
.nav-container > .theme-toggle {
    margin-left: auto;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
    padding: 0 20px;
}

nav .title {
    font-size: 19px;
    font-weight: bold;
    color: var(--nav-text);
    margin-left: 0;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

nav .title:hover {
  color: var(--text-color);
  text-decoration: none; /* 👈 ensures it stays underline-free on hover */
}

section {
    margin: 0 auto;
    max-width: 950px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

section#project-title {
    padding-top: 80px;
    font-size: 24px;
    font-weight: bold; 
}

section#project-content {
    padding-top: 5px;
    font-weight: normal;
    font-size: 16px;
    padding-bottom: 50px;
}

li:not(:last-child) {
    margin-bottom: 12px;
}

section#github a {
    color: var(--text-secondary);
    text-decoration: none;
    padding-bottom: 50px;
    display: inline-block;   
    transition: transform 0.3s ease, color 0.3s ease;
}

section#github a:hover {
    transform: scale(1.1);            
}

/* Tags and Tech Stack Styling */
.project-meta {
    margin: 1em 0 1.5em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: center;
    font-size: 0.7em;
    color: #888;
}

.tag {
    display: inline-block;
    background-color: var(--text-muted);
    color: var(--bg-color);
    padding: 0.15em 0.5em;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tag:hover {
    background-color: var(--link-color);
    cursor: pointer;
}
