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

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #777777;
  --border: #e0e0e0;
  --accent: #0057ff;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
}

body.dark {
  --bg: #111111;
  --text: #eeeeee;
  --muted: #888888;
  --border: #2a2a2a;
  --accent: #4d8aff;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

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

/* layout */
.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* nav */
nav {
  padding: 32px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-family: var(--mono);
  font-size: 14px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

/* dark mode toggle */
.dark-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.04em;
}

.dark-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}

/* hero */
.hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero-status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.03em;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.1s forwards;
}

.hero h1 {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.2s forwards;
}

.hero p {
  font-size: 15px;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.75;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.3s forwards;
}

.hero-links {
  margin-top: 28px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.4s forwards;
}

.hero-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.hero-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* section */
section { padding: 40px 0; border-bottom: 1px solid var(--border); }

.section-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* projects */
.project {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  transition: opacity 0.15s;
}

.project:hover { opacity: 0.6; }

.project-name {
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 4px;
}

.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.project-stack {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 3px;
}

/* skills */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  font-size: 13px;
}

.skill-row-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 2px;
  letter-spacing: 0.04em;
}

.skill-row-items { color: var(--text); line-height: 1.7; }

/* about */
.about p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
}

.about p + p { margin-top: 14px; }

/* contact */
.contact-text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.75;
  max-width: 440px;
}

.contact-email {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  display: inline-block;
  transition: opacity 0.15s;
}

.contact-email:hover { opacity: 0.7; }

/* footer */
footer {
  padding: 24px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

/* animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* responsive */
@media (max-width: 520px) {
  .hero h1 { font-size: 28px; }
  .project { grid-template-columns: 1fr; }
  .project-stack { display: none; }
  .skill-row { grid-template-columns: 80px 1fr; }
  nav { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-right { flex-direction: column; align-items: flex-start; gap: 12px; }
  footer { flex-direction: column; gap: 12px; align-items: flex-start; }
}
