:root {
  --bg: #0d0d0d;
  --bg-elevated: #161616;
  --bg-card: #1a1a1a;
  --border: #2a2a2a;
  --border-soft: #333;
  --text: #e8e8e8;
  --text-dim: #9a9a9a;
  --green: #4af626;
  --green-dim: #2d9a18;
  --amber: #e1b066;
  --amber-dim: rgba(225, 176, 102, 0.25);
  --prompt: #4af626;
  --string: #e1b066;
  --radius: 6px;
  --font: "IBM Plex Mono", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 0%, #1a1f18 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, #141816 0%, transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  padding: 24px 16px 48px;
  position: relative;
}

/* soft CRT vignette + scanlines behind the window */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 2px,
      rgba(0, 0, 0, 0.12) 2px,
      rgba(0, 0, 0, 0.12) 3px
    );
  opacity: 0.7;
}

body > .window {
  position: relative;
  z-index: 1;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: #7cff5c;
}

/* ---------- Window chrome ---------- */
.window {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #111;
  border-bottom: 1px solid var(--border);
}

.traffic {
  display: flex;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.titlebar-label {
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- Header ---------- */
.site-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
}

.shell-intro {
  font-size: 13px;
}

.shell-intro p + p {
  margin-top: 2px;
}

.prompt {
  color: var(--prompt);
}

.output {
  color: var(--text-dim);
  padding-left: 0;
}

.string {
  color: var(--string);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 28px;
  padding: 28px 32px 36px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.gt {
  color: var(--green);
  margin-right: 4px;
}

/* ---------- Experience ---------- */
.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.exp-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(8px);
  animation: fade-up 0.45s ease forwards;
}

.exp-logo {
  flex-shrink: 0;
  width: 88px;
  height: 44px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #ffffff;
  color: #111;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: -0.02em;
  overflow: hidden;
}

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

.exp-company {
  font-weight: 600;
  font-size: 13px;
}

.exp-meta {
  color: var(--text-dim);
  font-size: 11px;
  margin: 2px 0 0;
}

.exp-dates {
  color: var(--text-dim);
  font-size: 11px;
  margin: 0 0 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
}

.tags.muted span {
  background: #222a28;
  color: #9db8a0;
  border: 1px solid #2a3530;
}

.tags.amber span {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
}

/* ---------- Projects ---------- */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 42%);
  gap: 16px;
  align-items: stretch;
  opacity: 0;
  animation: fade-in 0.55s ease forwards;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #3f4a3f;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .exp-item {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .project-card:hover {
    transform: none;
    box-shadow: none;
  }

  .cursor {
    animation: none;
  }
}

.project-title {
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
}

.project-desc {
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
}

.project-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  background: #111;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 11px;
  overflow: hidden;
  text-align: center;
  align-self: center;
}

.project-media:not(:has(img)) {
  border-style: dashed;
  border-color: #3a3a3a;
  padding: 12px;
  background:
    repeating-linear-gradient(
      -45deg,
      #141414,
      #141414 8px,
      #1c1c1c 8px,
      #1c1c1c 16px
    );
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.project-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: 4px;
}

.project-link {
  font-size: 12px;
  color: var(--text-dim);
}

.project-link a {
  color: var(--amber);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  text-decoration-color: transparent;
  text-decoration-line: underline;
}

.project-link a:hover {
  color: #f0c98a;
  text-decoration-color: #f0c98a;
}

.site-footer .footer-links a,
.site-footer .output a {
  color: var(--amber);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  text-decoration-line: underline;
  text-decoration-color: transparent;
}

.site-footer .footer-links a:hover,
.site-footer .output a:hover {
  color: #f0c98a;
  text-decoration-color: #f0c98a;
}

.sub-cmd {
  color: var(--green);
  font-size: 12px;
  margin-top: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 32px 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-media {
    order: -1;
  }
}

@media (max-width: 520px) {
  body {
    padding: 8px 0 24px;
  }

  .window {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .site-header,
  .layout,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}
