:root {
    --background-color: #0A0A0A;
    --text-color: #EAEAEA;
    --primary-color: #FFFFFF;
    --secondary-color: #A0A0A0;
    --accent-color: #333333;
    --hover-color: #1a1a1a;
    --hover-gradient-start: #222222;
    --font-heading: 'Rokkitt', serif;
    --font-body: 'Ubuntu', sans-serif;
}
body.light-theme {
    --background-color: #F5F5F5;
    --text-color: #222222;
    --primary-color: #000000;
    --secondary-color: #666666;
    --accent-color: #DDDDDD;
    --hover-color: #ebebeb;
    --hover-gradient-start: #FFFFFF;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { padding: 100px 0; border-bottom: 1px solid var(--accent-color); }
section:last-of-type { border-bottom: none; }
.section-title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
body.menu-open {
    overflow: hidden;
}
header {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    background-color: rgba(var(--background-color-rgb, 10, 10, 10), 0.8);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--accent-color);
}
:root { --background-color-rgb: 10, 10, 10; }
body.light-theme { --background-color-rgb: 245, 245, 245; }
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.logo-link {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.logo-link:hover {
    color: var(--secondary-color);
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.theme-toggle:active {
    transform: scale(0.9);
}
.theme-toggle svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.sm-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1;
}
.sm-toggle-textWrap {
  position: relative;
  display: inline-block;
  height: 1em;
  overflow: hidden;
  white-space: nowrap;
}
.sm-toggle-textInner {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.sm-toggle-line {
  display: block;
  height: 1em;
  line-height: 1;
}
.sm-toggle-line:last-child {
    position: absolute;
    top: 100%;
}
.sm-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sm-icon-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: 50% 50%;
  will-change: transform;
}
.staggered-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: clamp(320px, 45vw, 500px);
  height: 100%;
  background: var(--background-color);
  display: flex;
  flex-direction: column;
  padding: 8rem 2.5rem 3rem 2.5rem;
  overflow-y: auto;
  z-index: 1000;
  visibility: hidden;
}
.sm-prelayers {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(320px, 45vw, 500px);
  pointer-events: none;
  z-index: 999;
}
.sm-prelayer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
}
.sm-prelayers .sm-prelayer:nth-child(1) { background: #333; }
.sm-prelayers .sm-prelayer:nth-child(2) { background: #222; }
body.light-theme .sm-prelayers .sm-prelayer:nth-child(1) { background: #eee; }
body.light-theme .sm-prelayers .sm-prelayer:nth-child(2) { background: #ddd; }
.sm-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sm-panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sm-panel-itemWrap {
  position: relative;
  overflow: hidden;
  line-height: 1;
}
.sm-panel-item {
  position: relative;
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3.5rem;
  cursor: pointer;
  line-height: 1;
  letter-spacing: -2px;
  text-transform: uppercase;
  display: inline-block;
  text-decoration: none;
  padding-right: 1.4em;
}
.sm-panel-itemLabel {
  display: inline-block;
  will-change: transform;
  transform-origin: 50% 100%;
}
.sm-panel-item:hover {
  color: var(--secondary-color);
}
.sm-socials {
  margin-top: auto;
  padding-top: 2rem;
}
.sm-socials-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.sm-socials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}
.sm-socials-link {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
.sm-socials-link:hover {
  color: var(--secondary-color);
}
.pill-nav-items {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  height: 42px;
  background-color: var(--accent-color);
  border-radius: 9999px;
  padding: 4px;
}
.pill-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  padding: 0;
  height: 100%;
}
.pill-list > li {
  display: flex;
  height: 100%;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 18px;
  background: transparent;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.pill .hover-circle {
  position: absolute;
  left: 50%;
  bottom: 0;
  border-radius: 50%;
  background: var(--primary-color);
  z-index: 1;
  display: block;
  pointer-events: none;
  will-change: transform;
}
.pill .label-stack {
  position: relative;
  display: inline-block;
  line-height: 1;
  z-index: 2;
}
.pill .pill-label {
  position: relative;
  z-index: 2;
  display: inline-block;
  line-height: 1;
  transition: color 0.3s ease;
  will-change: transform;
}
.pill .pill-label-hover {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--background-color);
  z-index: 3;
  display: inline-block;
  will-change: transform, opacity;
}
.desktop-only {
  display: flex;
}
#hero { min-height: calc(100vh - 90px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; border-bottom: none; }
.hero-content h1 { font-family: var(--font-heading); font-size: 7vw; font-weight: 700; line-height: 1; margin-bottom: 1.5rem; color: var(--primary-color); }
.hero-content .line { overflow: hidden; }
.hero-content .tagline { font-family: var(--font-body); font-size: 1.5rem; font-weight: 300; color: var(--secondary-color); max-width: 700px; }
.hero-tagline-word {
    display: inline-block;
    will-change: transform, filter, opacity;
    padding-right: 0.25em;
}
.about-content p {
    font-family: var(--font-body);
    font-size: 2.2rem;
    line-height: 1.4;
    max-width: 900px;
    font-weight: 300;
}
.about-content .ripple-text-letter {
    display: inline-block;
}
.about-content strong { font-family: var(--font-body); font-weight: 500; color: var(--primary-color); }
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem 4rem;
}
.skill-category { min-width: 200px; }
.skill-category h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 1rem; }
.skill-category p { color: var(--secondary-color); line-height: 1.8; }
.project-list, .experience-list { display: flex; flex-direction: column; }
.project-item, .experience-item {
    padding: 3.5rem 2.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.4s ease, transform 0.3s ease;
    border-radius: 24px;
    margin-bottom: 2rem;
}
.project-item { display: flex; justify-content: space-between; align-items: center; }
.experience-item { display: block; }
#projects, #credentials, #education {
    border-bottom: none;
}
.project-item:last-child, .experience-item:last-child {
    margin-bottom: 0;
}
a.project-item:hover, a.experience-item:hover {
    background: linear-gradient(145deg, var(--hover-gradient-start), var(--hover-color));
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.project-item h3 { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 700; color: var(--primary-color); line-height: 1.1; }
.project-details { text-align: right; min-width: 300px; }
.project-details p { font-size: 1rem; color: var(--secondary-color); }
.project-details span { display: inline-block; margin-top: 0.5rem; padding: 0.3rem 0.7rem; border: 1px solid var(--accent-color); border-radius: 20px; font-size: 0.9rem; }
.experience-item h3 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; color: var(--primary-color); margin-bottom: 0.5rem;}
.experience-item p { color: var(--secondary-color); max-width: 800px; margin-bottom: 1rem; }
.credential-link { color: var(--primary-color); font-weight: 500; text-decoration: none; }
.credential-link:hover { text-decoration: underline; }
#contact { text-align: center; border-bottom: 1px solid var(--accent-color); }
.contact-content .email-link {
    font-family: var(--font-heading); font-size: 6vw; font-weight: 700; color: var(--primary-color); text-decoration: none; position: relative;
    display: inline-block; transition: transform 0.3s ease;
}
.contact-content .email-link:hover { transform: scale(1.05); }
.contact-content .email-link::after {
    content: ''; position: absolute; width: 100%; height: 2px; bottom: -5px; left: 0;
    background-color: var(--primary-color); transform: scaleX(0); transform-origin: bottom right;
    transition: transform 0.4s ease-out;
}
.contact-content .email-link:hover::after { transform: scaleX(1); transform-origin: bottom left; }
footer { padding: 3rem 0; text-align: center; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; font-size: 0.9rem; color: var(--secondary-color); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--primary-color); }
@media (max-width: 1024px) {
    .desktop-only {
        display: none;
    }
}
@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    header { padding: 1.5rem 0; }
    .hero-content h1, .contact-content .email-link { font-size: 12vw; }
    .project-item { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .project-details { text-align: left; }
    .about-content p { font-size: 1.8rem; }
    .project-item h3 { font-size: 2.5rem; }
}
