@import url("colors.css");

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--canvas);
  color: var(--text-body);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

/* === CURSOR GLOW === */
.cursor-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow-purple), transparent 80%);
}

/* === LAYOUT === */
.layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
  min-width: 0;
}

/* === SIDEBAR === */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 380px;
  min-width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 96px 0;
  padding-right: 48px;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.name {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

.tagline {
  font-size: 0.95rem;
  color: var(--text-body);
  max-width: 260px;
  line-height: 1.6;
  margin-bottom: 48px;
}

/* === NAV === */
.nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  width: fit-content;
}

.nav-line {
  display: block;
  width: 32px;
  height: 1.5px;
  background-color: currentColor;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover .nav-line,
.nav-link.active .nav-line {
  width: 64px;
  background-color: var(--text-primary);
}

/* === SOCIAL ICONS === */
.social-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social-icon {
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
}

.social-icon svg {
  width: 22px;
  height: 22px;
}

.social-icon:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* === MAIN CONTENT === */
.main-content {
  flex: 1;
  padding: 96px 0 96px 48px;
  max-width: 740px;
  min-width: 0;
}

/* === SECTION === */
.section {
  margin-bottom: 100px;
  scroll-margin-top: 96px;
}

.section-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-left: -48px;
  margin-right: -48px;
  padding: 16px 48px;
  background-color: var(--sticky-scrim); /* More opaque */
  backdrop-filter: blur(8px);
  margin-bottom: 32px;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
}

.view-all-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.view-all-link:hover .arrow-icon {
  transform: translate(3px, -3px);
  color: var(--accent);
}

/* === ABOUT === */
.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.inline-link:hover {
  border-bottom-color: var(--accent);
}

/* === EXPERIENCE CARDS === */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.experience-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 20px 24px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
  position: relative;
}

.experience-card--static {
  cursor: default;
}

.experience-card:hover {
  background-color: var(--surface-50);
  box-shadow: inset 0 1px 0 0 var(--border-default);
  border-color: var(--border-default);
}

.experience-card:hover .exp-title,
.experience-card:hover .arrow-icon {
  color: var(--accent);
}

.experience-card.experience-card--static:hover .exp-title {
  color: var(--text-primary);
}

.exp-date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 4px;
  line-height: 1.5;
}

.exp-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.arrow-icon {
  display: inline-block;
  font-style: normal;
  transition: transform 0.2s ease, color 0.2s ease;
  color: var(--text-primary);
}

.experience-card:hover .arrow-icon {
  transform: translate(3px, -3px);
}

.exp-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--surface-solid);
  border: 1px solid var(--border-default);
}

.exp-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.8;
}

.experience-card:hover .exp-thumbnail img {
  transform: scale(1.05);
  opacity: 1;
}

.featured-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 24px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  background-color: var(--surface-40);
  border: 1px solid var(--border-ghost-white);
}

.exp-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--surface-solid);
  border: 1px solid var(--border-default);
}

.featured-card:hover {
  background-color: var(--surface-60);
  transform: translateY(-4px);
  border-color: var(--accent-border);
}

.featured-card .exp-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.exp-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 14px;
}

/* === TECH TAGS === */
.tech-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tags li {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 14px;
  letter-spacing: 0.04em;
}

/* === RESUME LINK === */
.resume-link-wrap {
  margin-top: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.resume-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.resume-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
  padding-bottom: 2px;
}

.resume-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.resume-link svg {
  transition: transform 0.2s ease;
}

.resume-link:hover svg {
  transform: translate(3px, -3px);
}

/* === PROJECTS === */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-card {
  display: block;
  padding: 20px 24px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
}

.project-card:hover {
  background-color: var(--surface-50);
  box-shadow: inset 0 1px 0 0 var(--border-default);
  border-color: var(--border-default);
}

.project-card:hover .project-title {
  color: var(--accent);
}

.project-card:hover .arrow-icon {
  transform: translate(3px, -3px);
  color: var(--accent);
}


/* === SUBHEADERS === */

.project-card:hover .project-img {
  opacity: 1;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 14px;
}

.project-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* === SUBHEADERS === */
.projects-subheader {
  font-size: 1rem;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 16px;
  padding: 0 24px;
  font-weight: 600;
}

.projects-subsubheader {
  font-size: 0.8rem;
  color: var(--text-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 20px;
  margin-bottom: 10px;
  padding: 0 24px 0 44px;
  font-weight: 600;
}

.social-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 12px;
}

/* === ARTICLE CARDS === */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 24px;
  background-color: var(--surface-40);
  border: 1px solid var(--border-ghost-white);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.article-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--surface-solid);
  border: 1px solid var(--border-default);
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.8;
}

.article-card:hover .article-thumbnail img {
  transform: scale(1.05);
  opacity: 1;
}

.article-card:hover {
  background-color: var(--surface-50);
  box-shadow: inset 0 1px 0 0 var(--border-default);
  border-color: var(--border-default);
}

.article-card:hover .article-title {
  color: var(--accent);
}

.article-card:hover .arrow-icon {
  transform: translate(3px, -3px);
  color: var(--accent);
}

.article-card .card-content {
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
}

.article-pub {
  color: var(--accent);
  background-color: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.article-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color 0.2s ease;
}

.article-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-body);
  margin-top: 4px;
}

/* === FOOTER === */
.footer {
  padding: 48px 0 0;
  border-top: 1px solid var(--border-subtle);
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-faint);
  line-height: 1.7;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    padding: 0 24px;
  }

  .sidebar {
    position: static;
    height: auto;
    width: 100%;
    min-width: unset;
    padding: 64px 0 0;
  }

  .sidebar-inner {
    height: auto;
    gap: 48px;
  }

  .tagline {
    max-width: 100%;
    margin-bottom: 0;
  }

  .nav {
    display: none;
  }

  .social-links {
    margin-top: 32px;
  }

  .main-content {
    padding: 48px 0 96px;
  }

  .section-header {
    display: block;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .experience-card,
  .project-card,
  .featured-card,
  .article-card {
    grid-template-columns: 1fr;
  }

  .exp-date {
    padding-top: 0;
  }

  .project-img-wrap {
    display: none;
  }
}

@media (max-width: 600px) {
  .layout {
    padding: 0 20px;
  }

  .name {
    font-size: 2.2rem;
  }
}
