
/* Minimal, white-first layout */
html {
  scroll-behavior: smooth;
}

:root {
  color-scheme: light;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0f172a;
  --border: #e5e7eb;
  --panel: #f8fafc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.7;
}


a {
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

a:hover {
  background-color: #eddac1;
  text-decoration: none;
}

/* Ensure inline links have proper hover area */
a:not(.pill):not(.link-btn):not(nav a) {
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 4px;
  display: inline-block;
}

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 16px 72px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand img {
  height: 32px;
  width: auto;
  display: block;
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

nav a {
  padding: 6px 8px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
  font-size: 14px;
  white-space: nowrap;
}

nav a:hover,
nav a[aria-current="page"] {
  background: #eddac1;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.5vw, 32px);
  letter-spacing: -0.02em;
  color: #013b70;
  text-align: center;
}

section#home h1 {
  font-size: clamp(48px, 7vw, 64px);
}

h2 {
  margin: 4px 0 12px;
  font-size: clamp(24px, 3.5vw, 32px);
  letter-spacing: -0.02em;
  color: #013b70;
  text-align: center;
}

p {
  margin: 0;
  color: var(--muted);
}

li {
  margin: 0 0 8px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

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

li:last-child {
  margin-bottom: 0;
}

.lede {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 4px;
}

section#projects .lede {
  margin-bottom: 20px;
}

.intro-link {
  color: #d67900;
  text-decoration: underline;
}

.intro-link:hover {
  background-color: #eddac1;
}

.previously-list {
  list-style: none;
  padding-left: 0;
  margin: 24px 0 0 0;
}

.previously-list li {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  padding: 0;
  display: flex;
  align-items: flex-start;
  padding-left: 0;
}

.previously-list li::before {
  content: "→";
  color: var(--text);
  margin-right: 8px;
  flex-shrink: 0;
  width: 16px;
  text-align: left;
}

.previously-list li div {
  flex: 1;
}

.experience-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 2px;
}

.previously-list li .experience-date {
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.previously-list li i {
  font-size: 15px;
  font-style: italic;
  display: block;
  margin-top: 2px;
  padding-left: 0;
  color: #64748b;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

section[id] {
  margin-top: 40px;
  margin-bottom: 40px;
}

section[id]:first-of-type {
  margin-top: 0;
}

/* Don't apply spacing to sections without IDs (like Reach Me) */
section:not([id]) {
  margin-top: 0;
  margin-bottom: 0;
}

/* Extra spacing between Reach Me and Experience */
section#experience {
  margin-top: 48px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
  width: 100%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  nav {
    gap: 4px;
  }
  
  nav a {
    padding: 6px 6px;
    font-size: 12px;
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  background: #fff;
  transition: background-color 0.2s ease;
}

.project-card:hover {
  background: #eddac1;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
}

.project-card h3 {
  color: #013b70;
}

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

.project-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dropdown-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.dropdown-btn:hover {
  color: var(--text);
}

.project-card.active .dropdown-btn {
  transform: rotate(180deg);
}

.project-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  padding: 6px;
}

.link-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.link-btn[href="___"] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.link-btn:hover:not([href="___"]) {
  background: #eddac1;
  border-color: var(--text);
  text-decoration: none;
}

.project-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.project-card.active .project-content {
  max-height: 2000px;
  margin-top: 16px;
}

.project-card ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0 0 12px 0;
}

/* Carousel Styles */
.carousel-container {
  margin-bottom: 20px;
  margin-top: 16px;
}

.carousel-compact .carousel-slide img {
  max-height: 200px;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
}

.carousel-slides {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-slide {
  min-width: 100%;
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 300px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: #fff;
  border-color: var(--text);
}

.carousel-prev {
  left: 12px;
}

.carousel-next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
}

.carousel-dot.active,
.carousel-dot:hover {
  background: var(--text);
}

/* 3D Model Container */
.model-container {
  width: 100%;
  height: 180px;
  margin-top: 16px;
  margin-bottom: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
}

.model-container + .carousel-container {
  margin-top: 12px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.project-date {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 0;
  font-weight: 400;
}

.list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  justify-content: center;
}

section.stack h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 4px;
}

section.stack {
  margin-bottom: 0;
  margin-top: 8px;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.pill span {
  display: inline-block;
}

.pill:hover {
  background: #eddac1;
  border-color: var(--text);
}

.footer {
  margin-top: 48px;
  font-size: 14px;
  color: var(--muted);
}

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

