:root {
  --bg: #f5f1e8;
  --surface: #fffcf5;
  --text: #202124;
  --muted: #5f6368;
  --accent: #0f766e;
  --accent-secondary: #b45309;
  --border: #ddd6c8;
}

body.dark-mode {
  --bg: #171717;
  --surface: #222222;
  --text: #f5f1e8;
  --muted: #c7bfb1;
  --accent: #2dd4bf;
  --accent-secondary: #dc2626;
  --border: #3a3a3a;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

*::before {
  box-sizing: border-box;
}

*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 12px;
}

.logo:hover {
  color: var(--accent);
}

nav ul {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}

#hero {
  padding-top: 120px;
  padding-bottom: 120px;
  border-top: none;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

body.page-loaded #hero {
  opacity: 1;
  transform: translateY(0);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-intro {
  font-size: 18px;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  align-items: center;
  gap: 64px;
}

.hero-text {
  max-width: 760px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 32px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: 0 24px 60px rgba(32, 33, 36, 0.12);
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-secondary);
  border-color: var(--accent-secondary);
  color: white;
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--accent);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background-color: var(--surface);
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

#about p {
  font-size: 18px;
  line-height: 1.7;
  max-width: 820px;
}

.about-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
}

.current-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.current-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
}

.current-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.current-card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 0;
}

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

.skill-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.skill-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.skill-card ul {
  margin: 0;
  padding-left: 20px;
}

.skill-card li {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 8px;
}

.skill-card li:last-child {
  margin-bottom: 0;
}

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

.project-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
}

.project-card h3 {
  font-size: 22px;
  margin-bottom: 14px;
  color: var(--text);
}

.project-card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
}

.project-card .project-tech {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.project-card .project-status {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-secondary);
  background-color: #f3eadc;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 0;
}

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

.journey-list {
  display: grid;
  gap: 20px;
}

.journey-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
}

.journey-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

.journey-place {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.journey-item p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.contact-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
}

.contact-card p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 820px;
  margin-bottom: 24px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-links a {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--bg);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

.contact-links a:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  background-color: #f3eadc;
}

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
  z-index: 20;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--accent);
  color: var(--surface);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--accent-secondary);
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 36px;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

p {
  font-size: 17px;
  color: var(--muted);
  max-width: 760px;
  margin-top: 0;
  margin-bottom: 16px;
}

ul {
  padding-left: 20px;
  margin-top: 0;
}

li {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  header {
    min-height: auto;
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 12px;
  }

  nav a {
    font-size: 14px;
  }

  main {
    padding: 0 20px;
  }

  section {
    padding: 72px 0;
  }

  #hero {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  h3 {
    font-size: 20px;
  }

  p {
    font-size: 16px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-intro {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-photo {
    width: 220px;
    height: 220px;
    border-radius: 26px;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
  }

  .about-card,
  .skill-card,
  .project-card,
  .journey-item,
  .contact-card {
    padding: 24px;
  }

  .current-grid {
    grid-template-columns: 1fr;
  }

  .current-card {
    padding: 24px;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

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

  .contact-links a {
    text-align: center;
  }

  footer {
    padding: 24px 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  header {
    padding: 16px;
  }

  main {
    padding: 0 16px;
  }

  section {
    padding: 56px 0;
  }

  #hero {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .hero-photo {
    width: 190px;
    height: 190px;
    border-radius: 22px;
  }

  .about-card,
  .skill-card,
  .project-card,
  .journey-item,
  .contact-card,
  .current-card {
    padding: 20px;
    border-radius: 18px;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}
