﻿:root {
  --theme-color: #f5f1e8;
  --background: #f5f1e8;
  --surface: #fffaf0;
  --surface-two: #eae3d5;
  --text: #1f2923;
  --soft: #69756d;
  --border: #c8cfc8;
  --green: #087f4d;
  --green-light: #0da867;
  --amber: #b66a00;
  --terminal: #09110c;
  --terminal-text: #baf7ce;
  --header: rgba(245, 241, 232, 0.94);
}

html[data-theme="dark"] {
  --theme-color: #07100b;
  --background: #07100b;
  --surface: #0b1810;
  --surface-two: #102319;
  --text: #d5f7df;
  --soft: #82a18c;
  --border: #1b3c27;
  --green: #34e582;
  --green-light: #72ffa9;
  --amber: #ffb84d;
  --terminal: #030806;
  --terminal-text: #baf7ce;
  --header: rgba(7, 16, 11, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(50, 170, 90, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50, 170, 90, 0.035) 1px, transparent 1px),
    var(--background);
  background-size: 30px 30px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.narrow {
  max-width: 900px;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--header);
  backdrop-filter: blur(14px);
}

.header-content {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: var(--green);
  font-weight: 800;
}

.logo span {
  color: var(--amber);
}

.navigation {
  display: flex;
  align-items: center;
  gap: 22px;
}

.navigation a {
  color: var(--soft);
  font-size: 0.86rem;
}

.navigation a:hover {
  color: var(--green);
}

.theme-button,
.menu-button {
  min-height: 40px;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.theme-button {
  padding: 0 12px;
}

.menu-button {
  display: none;
  padding: 0 14px;
  color: var(--green);
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.hero-grid {
  padding: 90px 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 70px;
}

.command {
  margin-bottom: 16px;
  color: var(--green);
  font-size: 0.88rem;
}

.command::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 9px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 8vw, 6.3rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy h2 {
  max-width: 600px;
  color: var(--amber);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 500;
}

.intro {
  max-width: 630px;
  color: var(--soft);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.02rem;
}

.cursor {
  color: var(--green);
  animation: blink 0.85s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  font-size: 0.85rem;
  font-weight: 700;
}

.button.primary {
  color: #031009;
  background: var(--green);
}

.button.secondary {
  color: var(--green);
  background: transparent;
}

.button:hover {
  box-shadow: 6px 6px 0 var(--surface-two);
  transform: translate(-2px, -2px);
}

.terminal {
  overflow: hidden;
  border: 1px solid #294a34;
  background: var(--terminal);
  box-shadow: 18px 18px 0 var(--surface-two);
}

.terminal-top {
  min-height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6e8b77;
  border-bottom: 1px solid #294a34;
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff675f;
}

.terminal-top span:nth-child(2) {
  background: #ffc34a;
}

.terminal-top span:nth-child(3) {
  background: #36d576;
}

.terminal-top small {
  margin-left: auto;
}

.terminal-body {
  min-height: 360px;
  padding: 28px;
  color: var(--terminal-text);
  font-size: clamp(0.72rem, 1.6vw, 0.9rem);
}

.terminal-body p {
  margin-bottom: 10px;
}

.terminal-body b {
  color: #72ffa9;
}

.terminal-body i {
  color: #6bcfff;
  font-style: normal;
}

.terminal-body .output {
  color: #8ba994;
}

.terminal-body .success {
  color: #40dd7d;
}

.section {
  padding: 110px 0;
  border-top: 1px solid var(--border);
}

.file-content {
  padding: 38px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 24px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.file-content p {
  margin: 0;
  color: var(--soft);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.line-number {
  color: var(--green);
  user-select: none;
}

.section-title {
  margin-bottom: 44px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  letter-spacing: -0.055em;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.skill {
  padding: 30px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.skill > span {
  color: var(--green);
}

.skill h3 {
  margin: 30px 0 10px;
  font-size: 1.35rem;
}

.skill p {
  color: var(--soft);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.skill code,
.tags code {
  color: var(--green);
  font-size: 0.75rem;
}

.projects {
  background: var(--surface);
}

.project-card {
  padding: 50px;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  align-items: center;
  gap: 50px;
  border: 1px solid var(--border);
  background: var(--background);
}

.project-status {
  color: var(--green);
  font-size: 0.8rem;
}

.project-info h3 {
  margin: 18px 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.project-info > p {
  color: var(--soft);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.tags {
  margin: 24px 0 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags code {
  padding: 6px 9px;
  border: 1px solid var(--border);
}

.project-screen {
  padding: 24px;
  border: 1px solid #294a34;
  background: var(--terminal);
}

.graph {
  min-height: 300px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(100, 255, 150, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 255, 150, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
}

.graph-x,
.graph-y {
  position: absolute;
  background: #6f987b;
}

.graph-x {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.graph-y {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.curve {
  width: 170px;
  height: 220px;
  position: absolute;
  bottom: 28px;
  left: 50%;
  border: 4px solid #34e582;
  border-top: 0;
  border-radius: 0 0 100px 100px;
  filter: drop-shadow(0 0 8px #34e582);
  transform: translateX(-50%);
}

.contact {
  padding: 120px 0;
  text-align: center;
}

.contact h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.contact > div > p:not(.command) {
  color: var(--soft);
}

.contact a {
  color: var(--green);
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 800;
}

footer {
  border-top: 1px solid var(--border);
}

.footer-content {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--soft);
  font-size: 0.78rem;
}

.footer-content p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 850px) {
  .menu-button {
    display: block;
  }

  .navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 22px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }

  .navigation.is-open {
    display: flex;
  }

  .hero-grid,
  .project-card {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .hero-grid {
    padding: 65px 0;
  }

  .actions,
  .actions .button {
    width: 100%;
  }

  .terminal-body {
    min-height: 320px;
    padding: 20px 14px;
  }

  .section {
    padding: 78px 0;
  }

  .file-content {
    padding: 25px 18px;
    gap: 14px;
  }

  .project-card {
    padding: 28px 18px;
  }

  .footer-content {
    padding: 25px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}