html { scroll-behavior: smooth; }

html,
body {
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
}

.star-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #000;
  background-image: url("../assets/themes/darktheme.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.star-texture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.55) 100%);
}

#print-root {
  background: transparent;
}

.glass-shell,
.glass-panel,
.glass-nav,
.glass-modal,
.icon-btn {
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.glass-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-panel,
.glass-nav,
.glass-modal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background-color: rgba(0, 0, 0, 0.82);
}

.icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand-logo {
  width: 20px;
  height: 20px;
  display: block;
}

.more-about-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #111;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: Geist, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.more-about-btn:hover {
  background: #f4f4f4;
}

.about-more {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.about-more h3 {
  color: #fff;
  font-family: Sora, sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 16px;
}

.about-more h4 {
  color: #fff;
  font-family: Sora, sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 12px;
}

.about-more p {
  margin: 0 0 14px;
}

.about-more strong {
  color: #fff;
  font-weight: 600;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.projects-grid.is-open {
  align-items: start;
}

.projects-grid.is-open .project-card {
  height: auto;
  align-self: start;
}

.projects-grid.is-open .project-card-main {
  flex: 0 0 auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card-main {
  flex: 1 1 auto;
}

.project-card-foot {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-card-foot .project-links {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.project-card-foot .project-links:empty {
  display: none;
}

.project-thumb-static {
  cursor: pointer;
}

.project-thumb-empty {
  pointer-events: none;
}

.project-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin: -1.5rem -1.5rem 1.25rem;
  width: calc(100% + 3rem);
  overflow: hidden;
  border-radius: 1.5rem 1.5rem 0 0;
  background: #111;
  cursor: pointer;
  padding: 0;
  border: 0;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  transition: background-color 0.2s ease;
}

.project-thumb-play .material-symbols-outlined {
  font-size: 56px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.project-thumb:hover .project-thumb-play {
  background: rgba(0, 0, 0, 0.42);
}

.project-thumb.is-playing {
  cursor: default;
}

.project-thumb.is-playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}

.project-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.project-link:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.project-link .brand-logo {
  width: 18px;
  height: 18px;
}

.project-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: #fff;
  color: #111;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  padding: 8px 14px;
  font-family: Geist, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.project-more-btn:hover {
  background: #f4f4f4;
}

.project-more {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  font-size: 14px;
}

.project-more h4 {
  color: #fff;
  font-family: Sora, sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 10px;
}

.project-more p {
  margin: 0 0 12px;
}

.project-more ul {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

.project-more li {
  margin-bottom: 6px;
}

.project-more a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-more strong {
  color: #fff;
  font-weight: 600;
}

.achievement-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-item:last-child {
  border-bottom: 0;
}

.achievement-row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.achievement-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.achievement-logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.achievement-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.achievement-logo span {
  font-family: Sora, sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #111;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.achievement-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-top: 2px;
}

.achievement-name {
  font-weight: 700;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.achievement-year {
  font-family: JetBrains Mono, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.achievement-headline {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.45;
}

.achievement-highlight {
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  padding: 0.08em 0.32em;
  margin: 0 0.04em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-shadow: none;
}

.achievement-chevron {
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s ease;
  margin-top: 8px;
}

.achievement-item.is-open .achievement-chevron {
  transform: rotate(180deg);
}

.achievement-detail {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: 14px;
  padding: 0 20px 18px;
}

.achievement-logo-spacer {
  visibility: hidden;
  pointer-events: none;
  background: transparent;
}

.achievement-detail-inner {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.65;
}

.achievement-detail p {
  margin: 0 0 10px;
}

.achievement-detail p:last-child {
  margin-bottom: 0;
}

.achievement-detail a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 700px) {
  .achievement-row,
  .achievement-detail {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: 10px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .achievement-logo {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.projects-coda {
  margin: 2.75rem 0 0;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
}

.projects-coda-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  font-style: italic;
}

.projects-coda-more a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.projects-coda-more a .brand-logo {
  width: 14px;
  height: 14px;
}

.projects-coda-more a:hover {
  color: #111;
  background: #fff;
  border-color: #fff;
}

.project-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.project-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.glow-text { text-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }

.nav-link.is-active {
  color: #fff;
  font-weight: 700;
  border-bottom: 2px solid #fff;
  padding-bottom: 0.25rem;
}

.skill-chip.is-hidden { display: none; }

.skill-chip {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.skill-chip:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.skill-filter.is-on {
  background: #000;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

dialog::backdrop {
  background: #000;
}

#resume-sheet {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 800px;
  background: #fff;
  color: #111;
  padding: 48px;
  font-family: Geist, sans-serif;
}

footer .js-links button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-orb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 5px -1px 0 0 #000;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

html.light .theme-toggle {
  border-color: rgba(61, 51, 72, 0.22);
}

html.light .theme-toggle:hover {
  background: rgba(196, 92, 74, 0.1);
}

html.light .theme-orb {
  background: #3d3348;
  box-shadow: inset -5px 1px 0 0 #f7d6c8;
  transform: rotate(180deg);
}

html.light,
html.light body {
  background-color: #f7d6c8;
  color: #2f3e46;
}

html.light .star-texture {
  background-color: #f7d6c8;
  background-image: url("../assets/themes/lightthme.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

html.light .star-texture::after {
  display: block;
  background: radial-gradient(ellipse at center, rgba(255, 248, 242, 0.16) 0%, rgba(244, 214, 204, 0.4) 100%);
}

html.light #print-root {
  background: transparent;
}

html.light .glass-shell,
html.light .glass-panel,
html.light .glass-nav,
html.light .glass-modal,
html.light .icon-btn {
  background-color: rgba(255, 250, 246, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 28px rgba(61, 51, 72, 0.08);
}

html.light .glass-panel:hover {
  border-color: rgba(196, 92, 74, 0.28);
  background-color: rgba(255, 250, 246, 0.86);
}

html.light .more-about-btn,
html.light .project-more-btn {
  background: #c45c4a;
  color: #fff;
  border-color: #c45c4a;
}

html.light .more-about-btn:hover,
html.light .project-more-btn:hover {
  background: #b04f3f;
}

html.light .about-more,
html.light .project-more,
html.light .achievement-detail-inner {
  color: rgba(47, 62, 70, 0.76);
}

html.light .about-more h3,
html.light .about-more h4,
html.light .about-more strong,
html.light .project-more h4,
html.light .project-more a,
html.light .project-more strong,
html.light .achievement-name,
html.light .achievement-detail a,
html.light .nav-link.is-active {
  color: #2f3e46;
}

html.light .nav-link.is-active {
  border-bottom-color: #c45c4a;
}

html.light .project-badge {
  background: rgba(196, 92, 74, 0.1);
  border-color: rgba(196, 92, 74, 0.22);
  color: #8a4336;
}

html.light .project-link {
  border-color: rgba(47, 62, 70, 0.16);
  background: rgba(255, 255, 255, 0.45);
  color: #2f3e46;
}

html.light .project-link:hover,
html.light .projects-coda-more a:hover {
  background: #c45c4a;
  color: #fff;
  border-color: #c45c4a;
}

html.light .achievement-item {
  border-bottom-color: rgba(61, 51, 72, 0.1);
}

html.light .achievement-row:hover {
  background: rgba(196, 92, 74, 0.06);
}

html.light .achievement-year,
html.light .achievement-chevron,
html.light .projects-coda {
  color: rgba(47, 62, 70, 0.5);
}

html.light .achievement-headline {
  color: rgba(47, 62, 70, 0.78);
}

html.light .projects-coda-more a {
  color: rgba(47, 62, 70, 0.75);
  border-color: rgba(47, 62, 70, 0.18);
}

html.light .project-video {
  border-color: rgba(61, 51, 72, 0.12);
}

html.light .skill-chip:hover {
  background: #c45c4a;
  color: #fff;
  border-color: #c45c4a;
}

html.light .skill-filter.is-on {
  background: rgba(255, 250, 246, 0.9);
  border-color: rgba(196, 92, 74, 0.35);
  color: #2f3e46;
}

html.light dialog::backdrop {
  background: rgba(244, 214, 204, 0.62);
}

html.light .cta-btn {
  background: #c45c4a !important;
  color: #fff !important;
}

html.light .w-1.h-full.bg-white {
  background-color: #c45c4a !important;
}

html.light .cta-btn:hover {
  background: #b04f3f !important;
}

html.light .text-white { color: #2f3e46 !important; }
html.light .text-white\/90 { color: rgba(47, 62, 70, 0.92) !important; }
html.light .text-white\/80 { color: rgba(47, 62, 70, 0.8) !important; }
html.light .text-white\/70 { color: rgba(47, 62, 70, 0.7) !important; }
html.light .text-white\/60 { color: rgba(47, 62, 70, 0.62) !important; }
html.light .text-white\/55 { color: rgba(47, 62, 70, 0.55) !important; }
html.light .text-white\/50 { color: rgba(47, 62, 70, 0.5) !important; }
html.light .hover\:text-white:hover { color: #2f3e46 !important; }
html.light .border-white\/30 { border-color: rgba(61, 51, 72, 0.2) !important; }
html.light .border-white\/20 { border-color: rgba(61, 51, 72, 0.16) !important; }
html.light .border-white\/15 { border-color: rgba(61, 51, 72, 0.12) !important; }
html.light .border-white\/10 { border-color: rgba(61, 51, 72, 0.1) !important; }
html.light .bg-white\/10 { background-color: rgba(196, 92, 74, 0.08) !important; }
html.light .bg-white\/5 { background-color: rgba(255, 255, 255, 0.35) !important; }
html.light .hover\:bg-white\/10:hover { background-color: rgba(196, 92, 74, 0.1) !important; }
html.light .bg-black { background-color: rgba(255, 250, 246, 0.55) !important; }
html.light .bg-black\/60 { background-color: rgba(255, 250, 246, 0.68) !important; }
html.light .bg-black\/80 { background-color: rgba(255, 248, 244, 0.86) !important; }
html.light .glow-text { text-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .star-texture,
  .no-print,
  nav,
  aside,
  #mobile-menu,
  dialog {
    display: none !important;
  }

  body,
  main,
  .glass-shell,
  .glass-panel {
    background: #000 !important;
    color: #fff !important;
  }

  main {
    padding-top: 0 !important;
    max-width: 100% !important;
    box-shadow: none !important;
  }

  a { color: inherit !important; text-decoration: none !important; }
  .glass-panel, .glass-shell { break-inside: avoid; }
}
