/* =========================================================
   TURTLEHEAD GAMES
   Retro Indie Studio
   ========================================================= */

:root {
  --bg: #0d0e0f;
  --bg-light: #131516;
  --card: #151718;

  --border: #292d30;
  --border-light: #3a3f42;

  --text: #e5e3dd;
  --text-soft: #b1b2ae;
  --text-muted: #777c7f;

  --accent: #c2a66a;
  --accent-dark: #806d46;

  --font-mono: "Share Tech Mono", monospace;
  --font-display: "VT323", monospace;
}

/* =========================================================
   RESET & BASE STYLES
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

button,
input,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* =========================================================
   TOP BAR
   ========================================================= */

.top-bar {
  border-bottom: 1px solid var(--border);
  background: #0a0b0c;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.top-bar-content {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-separator {
  color: #44494c;
}

/* =========================================================
   HEADER
   ========================================================= */

header {
  padding: 62px 0 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(
      circle at 80% 0%,
      rgba(194, 166, 106, 0.055),
      transparent 30rem
    ),
    var(--bg);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* Logo --------------------------------------------------- */

.logo-image {
  width: 300px;
  height: 300px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Brand Text --------------------------------------------- */

.brand-text h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 78px);
  line-height: 0.78;
  font-weight: normal;
  letter-spacing: 0.025em;
  color: var(--text);
}

.brand-text p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-description {
  max-width: 650px;
  
  padding-bottom: 36px;
}

.header-description p {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.9;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

nav {
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.nav-btn {
  position: relative;
  padding: 15px 0 13px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.nav-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

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

.nav-btn.active::after {
  width: 100%;
}

/* =========================================================
   MAIN & TAB LAYOUT
   ========================================================= */

main {
  padding: 58px 0 100px;
  min-height: 600px;
}

.tab-content {
  display: none;
  animation: fade-in 0.25s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   SECTION HEADINGS & TYPOGRAPHY
   ========================================================= */

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.section-number {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: normal;
  line-height: 1;
  color: var(--text);
}

.section-label {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.centered {
  justify-content: center;
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.intro-card,
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 34px;
}

.intro-card {
  min-height: 360px;
}

.intro-card h3 {
  max-width: 720px;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: normal;
  line-height: 1.05;
  color: var(--text);
}

.intro-card p {
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.85;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-card {
  flex: 1;
  padding: 26px;
}

.info-card ul {
  list-style: none;
}

.info-card li {
  padding: 7px 0;
  border-bottom: 1px solid #222628;
  color: var(--text-soft);
  font-size: 11px;
}

.info-card li:last-child {
  border-bottom: 0;
}

/* =========================================================
   PILLARS
   ========================================================= */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.pillar {
  border-top: 2px solid var(--border-light);
  padding: 22px 4px 0;
}

.pillar-number {
  color: var(--accent);
  font-size: 10px;
}

.pillar h3 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: normal;
}

.pillar p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.75;
}

/* =========================================================
   PROJECTS
   ========================================================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

/* Project Image ------------------------------------------ */

.project-image {
  height: 230px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(
      135deg,
      rgba(194, 166, 106, 0.08),
      transparent
    ),
    #101213;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  color: #44494c;
  font-size: 10px;
  letter-spacing: 0.15em;
}

/* Project Content ---------------------------------------- */

.project-content {
  padding: 26px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.status {
  color: var(--accent);
}

.project-content h3 {
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: normal;
  line-height: 1;
}

.project-type {
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.project-content > p {
  min-height: 92px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.75;
}

/* Project Details ---------------------------------------- */

.project-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.project-details div {
  padding: 11px;
  border: 1px solid var(--border);
  background: #101213;
}

.project-details span {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.project-details strong {
  font-size: 10px;
  font-weight: normal;
  color: var(--text-soft);
}

/* Buttons & Notes ---------------------------------------- */

.btn-project {
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-soft);
  padding: 10px 15px;
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
}

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

.projects-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.projects-note span {
  color: var(--accent);
  font-size: 20px;
}

/* =========================================================
   DEV LOG & CONSOLE
   ========================================================= */

.devlog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 30px;
}

.dev-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.dev-entry:last-child {
  border-bottom: 1px solid var(--border);
}

.dev-date {
  color: var(--accent);
  font-size: 10px;
}

.dev-entry h3 {
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: normal;
}

.dev-entry p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.75;
}

/* Console ------------------------------------------------ */

.dev-console {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #090a0b;
}

.console-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  background: #111314;
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.console-output {
  height: 240px;
  overflow-y: auto;
  padding: 18px;
  color: #929895;
  font-size: 11px;
  line-height: 1.7;
}

.term-line {
  margin-bottom: 5px;
}

.term-command {
  color: var(--text);
}

.term-error {
  color: #b47c7c;
}

.terminal-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
}

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

.terminal-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.terminal-form input::placeholder {
  color: #4f5558;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 46px;
  border: 1px solid var(--border);
  background: var(--card);
  text-align: center;
}

.contact-intro h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: normal;
}

.contact-intro p {
  max-width: 520px;
  margin: 0 auto 30px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.contact-form {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.contact-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  background: #0e1011;
  color: var(--text);
  padding: 12px;
  outline: none;
  font-size: 11px;
}

.contact-input:focus {
  border-color: var(--border-light);
}

.btn-submit {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #171512;
  padding: 12px 18px;
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.btn-submit:hover {
  background: #d2b979;
}

.form-note {
  margin-top: 10px;
  color: #555b5e;
  font-size: 9px;
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 38px;
}

.contact-links div {
  padding: 15px;
  border-top: 1px solid var(--border);
}

.contact-links span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 9px;
}

.contact-links strong {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: normal;
}

/* =========================================================
   MODAL
   ========================================================= */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  width: min(650px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  background: #131516;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: #101112;
}

.modal-project-number {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.modal-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 32px;
}

.modal-body h2 {
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: normal;
}

.modal-type {
  margin-bottom: 30px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.modal-section {
  margin-bottom: 25px;
}

.modal-section p {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.8;
}

.modal-section ul {
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 2;
}

.modal-actions {
  text-align: right;
  padding-top: 10px;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: #555b5e;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

/* =========================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================= */

@media (max-width: 800px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  header {
    padding-top: 40px;
  }

  .brand-area {
    align-items: flex-start;
  }

  .logo-image {
    width: 60px;
    height: 60px;
  }

  .brand-text h1 {
    font-size: 50px;
  }

  .header-description {
    margin-left: 0;
    margin-top: 25px;
  }

  nav {
    gap: 18px;
  }

  .about-grid,
  .devlog-layout,
  .pillars,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-content > p {
    min-height: auto;
  }
}

@media (max-width: 550px) {
  .top-bar-content {
    display: block;
    padding: 8px 0;
  }

  .status-right {
    margin-top: 4px;
  }

  .section-heading,
  .section-label {
    display: block;
  }

  .section-label {
    margin-top: 8px;
  }

  .intro-card {
    padding: 25px;
  }

  .intro-card h3 {
    font-size: 30px;
  }

  .contact-container {
    padding: 28px 20px;
  }

  .contact-form {
    flex-direction: column;
  }

  .contact-links,
  .footer-content {
    grid-template-columns: 1fr;
    display: block;
  }

  .dev-entry {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .footer-content > div + div {
    margin-top: 7px;
  }
}