* {
    margin: 0;
    padding: 0;
    font-family: 'Georgia', serif;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    display: none;
}


:root {
    --bg: #c8e6c9;
    --text: #1b5e20;
    --muted-text: rgba(27, 94, 32, 0.75);
    --accent: #44c24c;
    --toggle-bg: #1b5e20;
    --toggle-fg: #c8e6c9;
    --border: #1b5e20;
    --shadow: rgba(27, 94, 32, 0.35);
}

.dark-scroll { display: none; }
body.dark-theme .light-scroll { display: none; }
body.dark-theme .dark-scroll { display: block; }


body {
    color: var(--text);
    background-color: var(--bg);
    font-size: clamp(0.25rem, 1.4vw, 1.75rem);
    max-width: 100%;
    max-height: 100%;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-bottom: 4rem;
}

body.dark-theme {
    color: var(--text);
    background-color: var(--bg);
}

.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: var(--toggle-bg);
    color: var(--toggle-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 100;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

body.dark-theme .theme-toggle {
    background: var(--toggle-bg);
    color: var(--toggle-fg);
}

.theme-toggle:hover {
    transform: scale(1.08);
}

.message {
    position: fixed;
    top: 1.5rem;
    right: 6rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: var(--toggle-bg);
    color: var(--toggle-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 100;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

body.dark-theme .message {
    background: var(--toggle-bg);
    color: var(--toggle-fg);
}

.message:hover {
    transform: scale(1.08);
}

.navigation-bar {
    position: relative;
    top: 1rem;
    text-align: center;
}

.navigation-bar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.navigation-bar li {
    margin: 0 1rem;
    display: inline-block;
}

.navigation-bar li a:hover {
    color: var(--accent);
}

.navigation-bar a {
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    color: var(--text);
    transition: color 0.3s ease;
}

.navigation-bar a:link,
.navigation-bar a:visited {
    color: var(--text);
    text-decoration: none;
}

body.dark-theme .navigation-bar a,
body.dark-theme .navigation-bar a:link,
body.dark-theme .navigation-bar a:visited {
    color: var(--text);
}

body.dark-theme .navigation-bar li a:hover {
    color: var(--accent);
}

.projects {
    width: min(1100px, 92vw);
    margin: 3rem auto 8rem;
}
  
.projects-header h1 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 1rem;
}
  
.projects-header p {
    margin-bottom: 2rem;
    color: var(--muted-text);
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    text-align: center;
}
  
.projects-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}
  
.project-card {
    grid-column: span 6;
    border: 2px solid rgba(0, 0, 0, 0.10);
    border-radius: 1.25rem;
    padding: 1rem 1rem 0.4rem;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
  
body.dark-theme .project-card {
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
  
.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.18);
}
  
body.dark-theme .project-card:hover {
    border-color: rgba(255, 255, 255, 0.35);
}
  
.project-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}
  
.project-top h2 {
    font-size: 1.3rem;
    font-weight: 700;
}
  
.project-year {
    font-size: 0.95rem;
    color: var(--muted-text);
}
  
.project-desc {
    font-size: clamp(0.9rem, 1.2vw, 1.15rem);
    margin-top: 0.8rem;
    line-height: 1.35;
    color: var(--text);
    opacity: 0.95;
}
  
.project-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
  
.project-tags span {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.22);
}
  
body.dark-theme .project-tags span {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.18);
}
  
.project-links {
    font-size: clamp(0.8rem, 0.95vw, 1.05rem);
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
}
  
.project-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}
  
.project-links a:hover {
    color: var(--accent);
    transform: translateY(-1px);
}
  
@media (max-width: 900px) {
    .project-card { grid-column: span 12; }
}

.social-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0 1.25rem;
}

.social-buttons ul {
    display: flex;
}

.social-buttons ul i {
    position: relative;
    top: 0.4rem;
    font-size: 1.15rem;
}

.social-buttons ul li {
    list-style: none;
    margin: 0 1rem;
}

.social-buttons ul li a {
    text-decoration: none;
    color: var(--text);
    transition: color 0.3s ease;
}

.social-buttons ul li a:link,
.social-buttons ul li a:visited {
    color: var(--text);
}

.social-buttons ul li:nth-child(1) a:hover {
    color: #0090de;
}

.social-buttons ul li:nth-child(3) a:hover {
    color: #a9a9a9;
}

.social-buttons ul li:nth-child(5) a {
    background-size: 100% 200%;
    background-position: center 0%;
    transition: background-position 0.3s ease;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to bottom, var(--text) 0%, var(--text) 50%, #f9ce34 50%, #ee2a7b 75%, #6228d7 100%);
}

.social-buttons ul li:nth-child(5) a:hover {
    background-position: center 100%;
}

body.dark-theme .social-buttons ul li:nth-child(1) a,
body.dark-theme .social-buttons ul li:nth-child(3) a, 
body.dark-theme .social-buttons ul li a:link,
body.dark-theme .social-buttons ul li a:visited {
    color: var(--text);
}

body.dark-theme .social-buttons ul li:nth-child(5) a {
    background-size: 100% 200%;
    background-position: center 0%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to bottom, var(--text) 0%, var(--text) 50%, #f9ce34 50%, #ee2a7b 75%, #6228d7 100%);
}

body.dark-theme .social-buttons ul li:nth-child(1) a:hover {
    color: #0090de;
}

body.dark-theme .social-buttons ul li:nth-child(3) a:hover {
    color: #a9a9a9;
}

body.dark-theme .social-buttons ul li:nth-child(5) a:hover {
    background-position: center 100%;
}

.palette-toggle {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: var(--toggle-bg);
    color: var(--toggle-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    z-index: 101;
    transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.palette-toggle:hover { transform: scale(1.08); }

.palette-panel {
    position: fixed;
    left: 1.25rem;
    top: 5.75rem;
    width: 15.5rem;
    max-height: 8.5rem;
    border-radius: 1.25rem;
    padding: 0.25rem 0.9rem 0.8rem;
    backdrop-filter: blur(10px);
    background: var(--toggle-bg);
    border: 1px solid rgba(0, 0, 0, 0.539);
    z-index: 101;
    transform: translateX(calc(-100% - 1.5rem));
    transition: transform 0.25s ease;
}

body.dark-theme .palette-panel {
    background: var(--toggle-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.palette-panel.open {
    transform: translateX(0);
}

.palette-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.palette-swatches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.6rem;
}

.palette-swatch {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.85rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    position: relative;
    transition: transform 0.15s ease, border-color 0.3s ease;
}

body.dark-theme .palette-swatch {
    border-color: rgba(255, 255, 255, 0.14);
}

.palette-swatch:hover { transform: translateY(-2px); }

.palette-swatch.active::after {
    content: "";
    position: absolute;
    inset: 0rem;
    border-radius: 0.85rem;
    border: 3px solid #707070;
    opacity: 0.95;
}

.palette-hint {
    font-size: 0.9rem;
    color: var(--muted-text);
    line-height: 1.1;
}


@media (max-width: 720px) {
    .palette-panel {
        width: 13.5rem;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(2px);
    transition: opacity 0.65s ease, transform 650ms ease, filter 650ms ease;
    will-change: opacity, transform, filter;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-stagger .reveal {
    transition-delay: calc(var(--i, 0) * 120ms);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}