:root {
    --width: 730px;
    --font-main: 'Hiragino Mincho Pro', 'Noto Serif JP', 'Sawarabi Mincho', serif;
    --font-secondary: Inter, system-ui, sans-serif;
    --font-scale: 1.15em;
    --background-color: #f8f6f5;
    --heading-color: #1a1a1a;
    --text-color: #2d2d2d;
    --link-color: #aec7e0;
    --visited-color: #6389ae;
    --code-background-color: #ddd9c9;
    --code-color: #1a1a1a;
    --code-block-background: #f5f3f0;
    --border-color: rgba(0, 0, 0, 0.1);
    --blockquote-color: #5a6a6b;
    --border-radius: 4px;
    --transition-speed: 0.3s;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-scale);
    margin: 0 auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    color: var(--text-color);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1em 0;
    margin-bottom: 2em;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 0.5em;
}

nav a {
    margin: 0 1em;
    font-family: var(--font-main);
    font-size: 1.0em;
    font-weight: 500;
    color: var(--heading-color);
    text-decoration: none;
    text-decoration-thickness: auto;
    position: relative;
    transition: color var(--transition-speed) ease;
}

nav a.active {
    color: var(--link-color);
    border-bottom: 1px solid var(--link-color);
}

nav a:hover {
    color: var(--link-color);
}

main {
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

footer{
    padding: 15px 0;
    text-align: center;
    border-top: 1px dashed rgba(0,0,0,0.2);
    margin-top: 1em;
    font-size: 0.8em;
    opacity: 0.8;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
    margin-top: 1em;
    margin-bottom: 0.3em;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.2em;
    text-align: center;
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.35em;
}

p {
    margin-bottom: 0.75em;
}

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
    transition: all var(--transition-speed) ease;
}

a:hover {
    text-decoration-thickness: 0.12em;
}

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  background: var(--link-color);
  width: var(--scroll-width, 0%);
  transition: width 0.1s ease;
}

.title h1 {
    font-size: 2.0em;
    margin-bottom: 0.1em;
    font-weight: 700;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}


.project-description, .experience-description {
    border-bottom: 1px dashed rgba(0,0,0,0.2);
    margin-bottom: 2em;
}

    

.project-description h3{
    color: var(--visited-color)
}

.experience-description h3{
    color: var(--visited-color);
}

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

.content-section.active {
    display: block;
}

#topButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--link-color);
    color: white;
    border: none;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#topButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#topButton.visible {
    opacity: 1;
    visibility: visible;
}