/* Brittany Chiang Inspired Design System */
:root {
  --bg-navy: #0a192f;
  --bg-navy-light: #112240;
  --bg-navy-lightest: #233554;
  --slate: #8892b0;
  --light-slate: #a8b2d1;
  --lightest-slate: #ccd6f6;
  --white: #e6f1ff;
  --teal: #64ffda;
  --teal-tint: rgba(100, 255, 218, 0.1);
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Roboto Mono', monospace;
  --nav-height: 100px;
  --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-navy-lightest) var(--bg-navy);
}

body {
  background-color: var(--bg-navy);
  color: var(--slate);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Spotlight Effect Rendering */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(600px at var(--x, 0px) var(--y, 0px), rgba(29, 78, 216, 0.15), transparent 80%);
  z-index: 3;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 100px;
  display: flex;
  justify-content: space-between;
}

/* Sidebar Styling */
header {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: 100vh;
  width: 50%;
  padding: 100px 0;
}

header h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--lightest-slate);
  letter-spacing: -0.025em;
}

header h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--lightest-slate);
  margin-top: 12px;
}

header p {
  margin-top: 16px;
  max-width: 300px;
  line-height: 1.5;
}

/* Nav links with animated lines */
nav {
  margin-top: 64px;
}

nav ul {
  list-style: none;
}

nav ul li a {
  display: flex;
  align-items: center;
  padding: 10px 0;
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition);
}

nav ul li a .nav-indicator {
  width: 32px;
  height: 1px;
  background-color: var(--slate);
  margin-right: 16px;
  transition: var(--transition);
}

nav ul li a:hover, nav ul li a.active {
  color: var(--teal);
}

nav ul li a:hover .nav-indicator, nav ul li a.active .nav-indicator {
  width: 64px;
  background-color: var(--teal);
}

/* Main Content */
main {
  width: 50%;
  padding: 100px 0;
}

section {
  margin-bottom: 140px;
}

section h3 {
  display: none; /* Only visible on mobile in original design */
}

/* Card Styling for Experience and Projects */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 16px;
  padding: 24px;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
}

.card:hover {
  background-color: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 0 rgba(148, 163, 184, 0.1);
}

.card .date {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-top: 4px;
}

.card h4 {
  color: var(--lightest-slate);
  font-size: 16px;
  margin-bottom: 8px;
  transition: var(--transition);
}

.card:hover h4 {
  color: var(--teal);
}

.card p {
  font-size: 14px;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  background-color: var(--teal-tint);
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 9999px;
}

/* Projects Thumbnail Adjustment */
.project-img {
  width: 100%;
  border: 2px solid var(--bg-navy-lightest);
  border-radius: 4px;
  transition: var(--transition);
}

.card:hover .project-img {
  border-color: var(--light-slate);
}

/* Writing / Archive Style Items */
.writing-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.writing-item {
    display: grid !important;
    grid-template-columns: 1fr 3.5fr;
    gap: 16px;
    padding: 16px 24px;
    border-radius: 4px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--slate);
    border-bottom: none !important; /* Overriding previous simple list style */
}

.writing-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 0 rgba(148, 163, 184, 0.1);
}

.writing-year {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate);
    margin-top: 4px;
}

.writing-content h4 {
    color: var(--lightest-slate);
    font-size: 16px;
    margin-bottom: 4px;
    transition: var(--transition);
}

.writing-item:hover h4 {
    color: var(--teal);
}

.writing-content p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.fa-external-link-alt {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 4px;
    transition: var(--transition);
}

.writing-item:hover .fa-external-link-alt {
    color: var(--teal);
    transform: translate(2px, -2px);
}

/* Socials in header */
.socials {
  display: flex;
  gap: 20px;
  margin-top: auto;
}

.socials a {
  color: var(--slate);
  font-size: 24px;
  transition: var(--transition);
}

.socials a:hover {
  color: var(--lightest-slate);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .container {
    padding: 0 40px;
    flex-direction: column;
  }

  header {
    position: relative;
    width: 100%;
    max-height: none;
    padding: 60px 0;
  }

  nav {
    display: none;
  }

  main {
    width: 100%;
    padding: 0;
  }

  section h3 {
    display: block;
    position: sticky;
    top: 0;
    background-color: rgba(10, 25, 47, 0.7);
    backdrop-filter: blur(8px);
    padding: 16px 0;
    margin-bottom: 24px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--lightest-slate);
    z-index: 10;
  }

  .card {
    grid-template-columns: 1fr;
    padding: 0;
    margin-bottom: 32px;
  }
}