:root {
  --background-color: #1a2131;
  --text-color: #e2e8f0;
  --important-text-color: #024dc5;
  --extremums-background-color: #010411;
  --card-background-color: #152946 ;
  --selected-link-color:#1590c5;
  --link-color: #16678a;
}

body {
    font-family: Arial, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
}

header {
    background: var(--extremums-background-color);
    padding: 20px;
    text-align: center;
}

h1 a, h2 a, h3 a{
    color: var(--text-color);
    text-decoration: none;
}

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

footer {
    background: var(--extremums-background-color);
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}

nav a {
    margin: 0 15px;
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
}

section {
    padding: 40px;
    max-width: 900px;
    margin: auto;
}

a .card{
    text-decoration: none;
}

p a{
    text-decoration: none;
    color: var(--selected-link-color);
}

p a:hover{
    text-decoration: none;
    color: var(--link-color);
}

.card {
    background: var(--card-background-color);
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
}

.card.clickable, .gallery-item-clickable{
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.card.clickable:hover, .gallery-item-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.card.clickable h3 a{
    color: var(--link-color);
}

.card.clickable  h3 a:hover{
    color: var(--selected-link-color);
}

.card.clickable p {
    color: inherit;
    text-decoration: none;
}

.card.clickable:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 3px;
}

.card img{
    max-height: 500;
    align-content: center;
}

.card img{
    max-height: 500;
    align-content: center;
    align-self: center;
}

.card a img{
    max-height: 500;
    align-content: center;
    align-self: center;
}

.btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background: var(--link-color);
    color: black;
    border-radius: 5px;
    text-decoration: none;
}

.btn a{
    color: var(--text-color);
}

.btn a:hover{
    color: var(--selected-link-color);
}

.btn:hover{
    color: black;
}

img {
    max-width: 100%;
    border-radius: 10px;
    margin: 10px 0;
}

h2 {
    border-bottom: 2px solid var(--link-color);
    padding-bottom: 10px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-card {
    background: var(--card-background-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.skill-card .percentage { 
    margin-top: 0.25rem; 
    color: var(--text-color); 
    font-weight: 700; 
}

.skill-card img {
    width: 60px;
    height: 60px;
}

canvas {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Additional classes for titles */
.title-main {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--link-color);
}

.title-sub {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.title-sub a{
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--link-color);
    padding: 0;
}

.title-small {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
}

/* Additional classes for paragraphs */
.para {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.para-large {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-color);
}

.para-small {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #94a3b8;
}

/* Additional classes for buttons */
.btn-primary {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background: var(--link-color);
    color: black;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.btn-secondary {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background: #64748b;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.btn-large {
    display: inline-block;
    margin-top: 10px;
    padding: 15px 20px;
    background: var(--link-color);
    color: black;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

aside {
  height: 100vh; /* Full-height */
  width: 160px; /* Set the width of the sidebar */
  position: fixed; /* Fixed Sidebar (stay in place on scroll) */
  z-index: 1; /* Stay on top */
  top: 0; /* Stay at the top */
  left: 0;
  background-color: #111; /* Black */
  overflow-x: hidden; /* Disable horizontal scroll */
  padding-top: 20px;
  box-sizing: border-box;
}
    
aside a, aside h1, aside p {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: var(--link-color);
  font-weight: bold;
  font-size: 14px;
  box-sizing: border-box;
}

aside a:hover {
  background-color: #333;
}

/* Flex container for contact and photo section */
.contact-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.flex-1 {
    flex: 1;
}

/* Photo/Image container */
.photo-container {
    flex: 1;
    min-width: fit-content + 20px;
    height: fit-content + 20px;
    background: var(--background-color);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: flex;
}

.photo-placeholder {
    width: fit-content;
    background: var(--card-background-color);
    border-radius: 8px;
    margin: 10px 0;
    height: fit-content;
    display: flex;
}

/* TOEIC Image - Full width */
.toeic-section {
    width: 100%;
    background: var(--background-color);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.toeic-image-wrapper {
    width: 100%;
    background: var(--card-background-color);
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.toeic-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Margin utility classes */
.margin-top-15 {
    margin-top: 15px;
}

.margin-top-20 {
    margin-top: 20px;
}

.margin-10-0 {
    margin: 10px 0;
}

/* Screenshot placeholder */
.screenshot-placeholder {
    margin: 10px 0;
    background: var(--background-color);
    padding: 15px;
    border-radius: 8px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hobbies grid */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Gallery section */
.gallery-section {
    margin-top: 20px;
    background: var(--background-color);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Gallery item */
.gallery-item, .gallery-item-clickable {
    background: var(--card-background-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
}

.gallery-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--link-color);
    margin-bottom: 0px;
    text-align: center;
    width: 100%;
}

.gallery-subtitle {
    font-size: 1rem;
    font-weight: bold;
    color: #595454;
    margin-top: 2px;
    margin-bottom: 2px;
    text-align: center;
    width: 100%;
}

.gallery-description {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.5;
}

#celesteRunnerCard{
    position: relative;
    overflow: hidden;
    background-image: url('../assets/Projects/CelesteRunner/CelesteRunnerLogo.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

#celesteRunnerCard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45); /* adjust opacity for more or less dimming */
    pointer-events: none;
    z-index: 0;
}

#celesteRunnerCard > * {
    position: relative;
    z-index: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        margin: 0; /* Remove left margin on mobile */
    }

    aside {
        width: 0%;
        height: 0;
        display: none;
    }

    aside a, aside h1, aside p {
        display: inline-block;
        padding: 5px 10px;
        font-size: 12px;
        text-align: center;
    }

    body {
        font-size: 14px;
    }

    header {
        padding: 15px;
    }

    nav a {
        margin: 0 10px;
        font-size: 14px;
    }

    section {
        padding: 20px;
        max-width: 100%;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }

    .skill-card {
        padding: 15px;
    }

    .skill-card img {
        width: 50px;
        height: 50px;
    }

    canvas {
        width: 80px;
        height: 80px;
        top: 5px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .title-main {
        font-size: 2rem;
    }

    .title-sub {
        font-size: 1.5rem;
    }

    .para, .para-large {
        font-size: 1rem;
    }

    .para-small {
        font-size: 0.8rem;
    }

    .btn, .btn-primary, .btn-secondary, .btn-large {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 15px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .skill-card {
        padding: 10px;
    }

    .skill-card img {
        width: 40px;
        height: 40px;
    }

    canvas {
        width: 60px;
        height: 60px;
    }

    h2 {
        font-size: 1.3rem;
    }

    .title-main {
        font-size: 1.8rem;
    }

    .title-sub {
        font-size: 1.3rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}