@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --bg-dark: #050505;
  --bg-dark-elevated: #101010;
  --bg-light: #fbfbfb;
  --bg-light-elevated: #ffffff;
  --text-dark: #fdfdfd;
  --text-light: #0c0c0c;
  --muted-dark: #d0d0d0;
  --muted-light: #3b3b3b;
  --border-dark: #1f1f1f;
  --border-light: #cfcfcf;
  --accent-dark: #ffffff;
  --accent-light: #050505;
  --font-sans: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "Courier New", monospace;
  --transition-speed: 0.25s;
  --radius-sm: 4px;
  --radius-md: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  transition: background var(--transition-speed), color var(--transition-speed);
}

body.light-theme {
  background: var(--bg-light);
  color: var(--text-light);
}

p {
  margin: 0 0 1.25rem;
  max-width: 64ch;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--transition-speed),
    text-decoration-color var(--transition-speed);
}

body.light-theme a {
  text-decoration-color: rgba(0, 0, 0, 0.35);
}

a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

body.light-theme a:hover {
  color: var(--accent-light);
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem 1.25rem;
  background: linear-gradient(
    180deg,
    rgba(14, 14, 14, 0.95) 0%,
    rgba(14, 14, 14, 0) 100%
  );
  border-bottom: 1px solid var(--border-dark);
  backdrop-filter: blur(8px);
}

body.light-theme header {
  background: linear-gradient(
    180deg,
    rgba(249, 249, 249, 0.95) 0%,
    rgba(249, 249, 249, 0) 100%
  );
  border-color: var(--border-light);
}

header h1 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  /* text-transform: uppercase; */
}

header a {
  text-decoration: none;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 3rem 5rem;
}

@media (max-width: 720px) {
  header {
    padding: 1.25rem 1.5rem;
  }

  main {
    padding: 2.5rem 1.5rem 4rem;
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.04em;
  /* text-transform: uppercase; */
  color: var(--accent-dark);
  margin: 0 0 1rem;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4 {
  color: var(--accent-light);
}

.section {
  margin-bottom: 4rem;
}

.landing-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.15em;
  /* text-transform: uppercase; */
  color: var(--muted-dark);
  margin-bottom: 2rem;
}

body.light-theme .landing-text {
  color: var(--muted-light);
}

.intro {
  font-size: 1.2rem;
  width: 100%;
  margin: 0 0 1.6rem;
  line-height: 1.75;
  max-width: none;
}

.landing-copy {
  min-width: 0;
}

.landing-art {
  margin-bottom: 1.25rem;
}

body.light-theme .landing-art {
  background: transparent;
}

.nyan-gif {
  display: block;
  width: min(100%, 320px);
  height: auto;
}

.theme-toggle {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

body.light-theme .theme-toggle {
  color: var(--muted-light);
}

.projects {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  background: var(--bg-dark-elevated);
  transition: transform var(--transition-speed),
    border-color var(--transition-speed), box-shadow var(--transition-speed);
  min-height: 240px;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

body.light-theme .project-card {
  border-color: var(--border-light);
  background: var(--bg-light-elevated);
}

body.light-theme .project-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.project-card .project-stack {
  display: inline-block;
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted-dark);
}

body.light-theme .project-card .project-stack {
  color: var(--muted-light);
}

.project-card p {
  margin-bottom: 0.8rem;
  color: var(--muted-dark);
}

body.light-theme .project-card p {
  color: var(--muted-light);
}

.project-card p:last-child {
  margin-top: auto;
  margin-bottom: 0;
}

.experience-list {
  display: grid;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.exp-item {
  border-left: 2px solid var(--border-dark);
  padding-left: 1.25rem;
}

body.light-theme .exp-item {
  border-color: var(--border-light);
}

.exp-date {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent-dark);
  font-weight: 500;
  letter-spacing: 0.12em;
}

body.light-theme .exp-date {
  color: var(--accent-light);
}

.exp-desc {
  color: var(--muted-dark);
}

body.light-theme .exp-desc {
  color: var(--muted-light);
}

.skills,
.education {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill,
.edu-item {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dark);
  color: var(--muted-dark);
}

body.light-theme .skill,
body.light-theme .edu-item {
  border-color: var(--border-light);
  color: var(--muted-light);
}

.thumbnail {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-dark-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  white-space: pre-wrap;
}

body.light-theme .thumbnail {
  background: var(--bg-light-elevated);
  border-color: var(--border-light);
}

.cli-figure,
.cli-figure-row {
  background: var(--bg-dark-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 2.5rem auto;
}

.cli-figure {
  max-width: 840px;
}

.cli-figure-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
  max-width: 620px;
}

body.light-theme .cli-figure,
body.light-theme .cli-figure-row {
  background: var(--bg-light-elevated);
  border-color: var(--border-light);
}

.cli-caption {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted-dark);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}

body.light-theme .cli-caption {
  color: var(--muted-light);
}

.ascii-art {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  line-height: 1.45;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-dark);
  text-align: left;
}

body.light-theme th,
body.light-theme td {
  border-color: var(--border-light);
}

thead th {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
}

body.light-theme .table-wrapper {
  border-color: var(--border-light);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

pre {
  font-family: var(--font-mono);
  background: var(--bg-dark-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  overflow-x: auto;
}

body.light-theme pre {
  background: var(--bg-light-elevated);
  border-color: var(--border-light);
}

@media (max-width: 600px) {
  .cli-figure-row {
    flex-direction: column;
  }

  header h1 {
    font-size: 1.35rem;
  }

  .project-card {
    padding: 1.25rem;
  }

  .landing-text {
    letter-spacing: 0.12em;
  }
}
