/* Brittany Chiang Portfolio - Simplified Recreation */

/* CSS Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: #0f172a; /* slate-900 */
  color: #94a3b8; /* slate-400 */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection styles */
::selection {
  background-color: #5eead4; /* teal-300 */
  color: #0c4a6e; /* teal-900 */
}

/* Focus styles */
:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}

/* Skip to content */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 1rem;
  background-color: #5eead4;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}

.skip-to-content:focus {
  left: 0;
}

/* Spotlight overlay effect */
.spotlight-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(600px circle at 0% 0%, rgba(29, 78, 216, 0.15), transparent 80%);
  pointer-events: none;
  z-index: 30;
}

/* Main container */
.container {
  margin: 0 auto;
  min-height: 100vh;
  max-width: 1280px; /* screen-xl */
  padding: 1.5rem; /* px-6 */
  font-family: inherit;
}

@media (min-width: 768px) {
  .container {
    padding: 3rem; /* md:px-12 md:py-16 */
  }
}

@media (min-width: 1024px) {
  .container {
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Split layout wrapper */
.split-layout {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .split-layout {
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
  }
}

/* Left sidebar - Fixed */
.sidebar {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 0;
    max-height: 100vh;
    width: 48%;
    justify-content: space-between;
    padding: 6rem 0; /* lg:py-24 */
  }
}

.sidebar-content {
/*   display: flex; */
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .sidebar-content {
    height: 100%;
    justify-content: space-between;
  }
}

/* Personal branding */
.branding {
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .branding {
    margin-bottom: 0;
  }
}

.name {
  margin-bottom: 0.5rem;
}

.name a {
  font-size: 3rem; /* text-4xl */
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #f1f5f9; /* slate-100 */
  text-decoration: none;
  transition: color 0.2s ease;
}

.name a:hover {
  color: #5eead4; /* teal-300 */
}

@media (min-width: 640px) {
  .name a {
    font-size: 3.75rem; /* sm:text-5xl */
  }
}

.title {
  margin-bottom: 1rem;
  font-size: 1.125rem; /* text-lg */
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #f1f5f9; /* slate-100 */
}

@media (min-width: 640px) {
  .title {
    font-size: 1.25rem; /* sm:text-xl */
  }
}

.tagline {
  max-width: 400px;
  color: #94a3b8; /* slate-400 */
}

/* Navigation */
.nav {
  display: none;
/*   margin-top: 4rem; */
  width: max-content;
}

@media (min-width: 1024px) {
  .nav {
    display: block;
  }
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  text-decoration: none;
  color: #64748b; /* slate-500 */
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: #f1f5f9; /* slate-100 */
}

.nav-indicator {
  display: block;
  margin-right: 1rem;
  height: 1px;
  width: 1rem; /* w-8 */
  background-color: #64748b; /* slate-600 */
  transition: all 0.2s ease;
}

.nav-link:hover .nav-indicator,
.nav-link.active .nav-indicator {
  width: 3rem; /* w-16 */
  background-color: #f1f5f9; /* slate-200 */
}

.nav-text {
  font-size: 0.75rem; /* text-xs */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Social links */
.social-links {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-links ul {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 1024px) {
  .social-links ul {
    align-items: flex-start;
    gap: 1rem;
  }
}

.social-links a {
  display: block;
  color: #94a3b8; /* slate-400 */
  transition: all 0.2s ease;
}

.social-links a:hover {
  color: #5eead4; /* teal-300 */
  transform: translateY(-2px);
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Main content - Scrollable */
.main-content {
  padding-top: 1rem; /* pt-24 */
}

@media (min-width: 1024px) {
  .main-content {
    width: 52%;
    padding: 6rem 0; /* lg:py-24 */
  }
}

/* Sections */
.section {
  margin-bottom: 4rem; /* mb-16 */
  scroll-margin-top: 4rem; /* scroll-mt-16 */
}

@media (min-width: 768px) {
  .section {
    margin-bottom: 4rem; /* md:mb-24 */
  }
}

@media (min-width: 1024px) {
  .section {
    /*margin-bottom: 9rem;*/ /* lg:mb-36 */
    scroll-margin-top: 4rem; /* lg:scroll-mt-24 */
  }
}

/* Section headers */
.mobile-section-header {
  display: block;
  margin-bottom: 2rem;
}

/* Mobile styles */
@media (max-width: 1023px) {
  .mobile-section-header {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 -1.5rem 1rem; /* -mx-6 mb-4 */
    width: 100vw;
    background-color: rgba(15, 23, 42, 0.75); /* bg-slate-900/75 */
    backdrop-filter: blur(12px);
    padding: 1.25rem 1.5rem; /* px-6 py-5 */
  }
}

@media (min-width: 768px) /* and (max-width: 1023px) */ {
  .mobile-section-header {
    margin: 0 -3rem 1rem; /* md:-mx-12 */
    padding: 1.25rem 3rem; /* md:px-12 */
  }
}

/* Desktop styles for section headers */
@media (min-width: 1024px) {
  .mobile-section-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 2rem;
/*     padding: 1.25rem 1.5rem; */
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
  }
}

.mobile-section-title {
  font-size: 1.125rem; /* text-lg */
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #f1f5f9; /* slate-100 */
  text-transform: uppercase;
  margin: 0;
}

@media (min-width: 640px) {
  .mobile-section-title {
    font-size: 1.25rem; /* sm:text-xl */
  }
}

/* Section content */
.section-content p {
  margin-bottom: 1rem;
}

.inline-link {
/*   color: #5eead4; /teal-300 */
  color: #ABD9ED; /* teal-300 */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.inline-link:hover {
/*  color: #2dd4bf;  teal-400 */
  color: #5EC0EA; /* teal-400 */
}


/* Special text effects (Korok seeds) */
.special-text {
  display: inline-flex;
  cursor: pointer;
}

.letter {
  transition: all 0.075s ease;
  font-weight: 500;
  color: #f1f5f9; /* slate-200 */
}

.special-text:hover .letter-k {
  color: #ef4444; /* red-500 */
  transform: translateY(-1px);
  transition-delay: 50ms;
}

.special-text:hover .letter-o {
  color: #f97316; /* orange-500 */
  transform: translateY(-1px);
  transition-delay: 100ms;
}

.special-text:hover .letter-r {
  color: #eab308; /* yellow-500 */
  transform: translateY(-1px);
  transition-delay: 150ms;
}

.special-text:hover .letter-o2 {
  color: #22c55e; /* green-500 */
  transform: translateY(-1px);
  transition-delay: 200ms;
}

.special-text:hover .letter-k2 {
  color: #3b82f6; /* blue-500 */
  transform: translateY(-1px);
  transition-delay: 250ms;
}

/* Experience section */
.experience-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-item {
  margin-bottom: 3rem;
}

.experience-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
  padding: 0.75rem 0; /* Match experience-card padding */
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .experience-card {
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .experience-card:hover {
    opacity: 1 !important;
  }
  
  .experience-list:hover .experience-card {
    opacity: 0.5;
  }
  
  .experience-list:hover .experience-card:hover {
    opacity: 1 !important;
  }
}

.experience-overlay {
  position: absolute;
  top: -1rem;
  right: -1rem;
  bottom: -1rem;
  left: -1rem;
  z-index: 0;
  border-radius: 0.375rem;
  background-color: transparent;
  transition: background-color 0.2s ease;
  display: none;
}

@media (min-width: 1024px) {
  .experience-overlay {
    display: block;
    top: -1.5rem;
    left: -1.5rem;
    right: -1.5rem;
  }
  
  .experience-card:hover .experience-overlay {
    background-color: rgba(30, 41, 59, 0.5); /* slate-800/50 */
  }
}

.experience-header {
  z-index: 10;
  grid-column: span 2;
  margin-bottom: 0.5rem;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .experience-header {
    margin-bottom: 0;
  }
}

.experience-period {
  font-size: 0.75rem; /* text-xs */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b; /* slate-500 */
}

.experience-content {
  z-index: 10;
  grid-column: span 6;
}

.experience-title {
  margin: 0;
}

.experience-link {
  display: inline-flex;
  align-items: baseline;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  color: #f1f5f9; /* slate-100 */
  text-decoration: none;
  transition: color 0.2s ease;
}

.experience-link:hover {
  color: #5eead4; /* teal-300 */
}

/* External link icons - Base styles */
.button-link-icon {
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.external-link-icon {
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  color: #94a3b8; /* slate-400 */
}

/* External link icon hover effects */
.publication-item > a:hover .external-link-icon,
.project-item > a:hover .project-title .external-link-icon {
  transform: translateX(4px) translateY(-4px) scale(1.1);
  color: #5eead4; /* teal-300 */
}

.resume-button:hover .button-link-icon {
  transform: translateX(4px) translateY(-4px);
}

.experience-link:hover .external-link-icon {
  transform: translate(2px, -2px);
}

/* Publication items */
.publication-item {
  margin-bottom: 0.5rem;
}

.publication-item > a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.publication-item .inline-link {
  display: inline-block;
  width: calc(100% - 2rem); /* Full width minus space for icon */
  vertical-align: top;
}

.publication-item .external-link-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  vertical-align: top;
}

.publication-item > a:hover .inline-link {
  color: #f1f5f9; /* slate-100 */
}

.experience-link:hover .external-link-icon {
  transform: translate(2px, -2px);
}

.experience-company {
  font-size: 1rem;
  font-weight: 500;
  color: #5eead4; /* teal-300 */
}

.experience-description {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem; /* text-sm */
  line-height: 1.5;
}

/* Technology tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  list-style: none;
  padding: 0;
}

.tech-tag {
  display: flex;
  align-items: center;
  margin-right: 0.375rem;
  margin-top: 0.5rem;
  border-radius: 9999px;
  background-color: rgba(94, 234, 212, 0.1); /* teal-400/10 */
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem; /* text-xs */
  font-weight: 500;
  line-height: 1.25;
  color: #5eead4; /* teal-300 */
}

/* Resume link */
.resume-link {
  margin-top: 3rem;
}

.resume-button {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: #0f172a; /* Dark text */
  background-color: #5eead4; /* teal-300 */
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  border: 2px solid #5eead4; /* teal-300 */
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.resume-button:hover {
  background-color: transparent;
  color: #5eead4; /* teal-300 */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 234, 212, 0.2);
}

/* Projects section */
.projects-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-item {
  margin-bottom: 3rem;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
  transition: all 0.2s ease;
  padding: 0.75rem 0; /* Match experience-card padding */
}

@media (min-width: 1024px) {
  .project-card:hover {
    opacity: 1 !important;
  }
  
  .projects-list:hover .project-card {
    opacity: 0.5;
  }
  
  .projects-list:hover .project-card:hover {
    opacity: 1 !important;
  }
}

.project-overlay {
  position: absolute;
  top: -1rem;
  right: -1rem;
  bottom: -1rem;
  left: -1rem;
  z-index: 0;
  border-radius: 0.375rem;
  background-color: transparent;
  transition: background-color 0.2s ease;
  display: none;
}

@media (min-width: 1024px) {
  .project-overlay {
    display: block;
    top: -1.5rem;
    left: -1.5rem;
    right: -1.5rem;
  }
  
  .project-card:hover .project-overlay {
    background-color: rgba(30, 41, 59, 0.5); /* Match experience cards exactly */
  }
}

.project-header {
  z-index: 10;
  grid-column: span 2;
  margin-bottom: 0.5rem;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .project-header {
    margin-bottom: 0;
  }
}

.project-period {
  font-size: 0.75rem; /* text-xs */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b; /* slate-500 */
}

.project-content {
  z-index: 10;
  grid-column: span 8;
  position: relative;
}

.project-title {
  margin: 0;
}

.project-title > div {
  display: block;
}

.project-title > div > span {
  display: inline-block;
  width: calc(100% - 2rem); /* Full width minus space for icon */
  vertical-align: top;
}

.project-title .external-link-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  vertical-align: top;
}

.project-link {
  display: inline-flex;
  align-items: baseline;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  color: #f1f5f9; /* slate-100 */
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: #5eead4; /* teal-300 */
}

.project-description {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem; /* text-sm */
  line-height: 1.5;
}

/* Project card links */
.project-item > a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-item > a:hover .project-title {
  color: #f1f5f9; /* slate-100 */
}


/* Projects archive link */
.projects-archive {
  margin-top: 3rem;
}

.archive-link {
  display: inline-flex;
  align-items: baseline;
  font-weight: 600;
  color: #f1f5f9; /* slate-100 */
  text-decoration: none;
  transition: color 0.2s ease;
}

.archive-link:hover {
  color: #5eead4; /* teal-300 */
}

/* Footer */
.footer {
  margin-top: 0rem;
  padding: 2rem 0;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer p {
  font-size: 0.75rem; /* text-xs */
  line-height: 1.5;
  color: #64748b; /* slate-500 */
}

.footer a {
  color: #5eead4; /* teal-300 */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #2dd4bf; /* teal-400 */
}

/* Responsive adjustments */
@media (max-width: 639px) {
  .container {
    padding: 0.75rem;
  }
  
  .main-content {
    padding-top: 1rem;
  }
  
  .sidebar-content {
    gap: 2rem;
  }
  
  .social-links {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .spotlight-overlay {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  body {
    background-color: #000000;
    color: #ffffff;
  }
  
  .inline-link,
  .nav-link.active,
  .experience-link:hover,
  .project-link:hover {
    color: #00ffff;
  }
}

/* Project group titles */
.project-group-title {
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: inherit; /* Match the font color with the rest of the document */
  text-decoration: underline;
}

/* Ensure hover effects do not apply to group titles */
.project-group-title:hover {
  background: none;
  cursor: default;
}

/* Adjust padding for project cards to avoid overlap */
.projects-list {
  padding-left: 0;
  margin-top: 0;
}