:root {
  --bg: #070a10;
  --bg-soft: #0e1420;
  --text: #eef2f8;
  --muted: #8b96a8;
  --amber: #d4a574;
  --amber-glow: rgba(212, 165, 116, 0.35);
  --teal: #2dd4bf;
  --teal-glow: rgba(45, 212, 191, 0.25);
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.04);
  --radius: 20px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Onest", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.nav-open {
  overflow: hidden;
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 calc(24px + env(safe-area-inset-right)) 80px calc(24px + env(safe-area-inset-left));
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) 0 20px;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(7, 10, 16, 0.92), rgba(7, 10, 16, 0.6));
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.scrolled { border-color: var(--line); }

.logo {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 1px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr min(38vw, 320px);
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-photo {
  margin: 0;
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-photo-frame {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  padding: 3px;
  background: linear-gradient(145deg, var(--amber), rgba(45, 212, 191, 0.5));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 60px var(--amber-glow);
}

.hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}

.hero-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal-glow);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  animation: fadeUp 0.8s 0.1s ease both;
  overflow-wrap: anywhere;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--amber), #f0d4a8 40%, var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 560px;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 36px;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: fadeUp 0.8s 0.3s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #b8844a);
  color: #1a1208;
  box-shadow: 0 8px 32px var(--amber-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--amber-glow);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--card);
}

.btn-ghost:hover {
  border-color: rgba(212, 165, 116, 0.4);
  color: var(--amber);
}

.scroll-hint {
  margin-top: auto;
  padding-top: 60px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeUp 0.8s 0.5s ease both, float 3s 1s ease-in-out infinite;
}

section {
  padding: 100px 0 20px;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 20px;
  max-width: 640px;
  overflow-wrap: anywhere;
}

.section-text {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0;
}

.bio-timeline {
  margin-top: 48px;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.bio-item {
  position: relative;
  padding-bottom: 40px;
}

.bio-item:last-child {
  padding-bottom: 0;
}

.bio-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--amber);
  box-shadow: 0 0 12px var(--amber-glow);
}

.bio-stage {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.bio-item h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.bio-item p strong {
  color: var(--text);
  font-weight: 600;
}

.bio-career {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.bio-career li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 12px 16px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.bio-year {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  padding-top: 2px;
}

.bio-career li strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 520px) {
  .bio-career li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.timeline {
  margin-top: 48px;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--amber);
  box-shadow: 0 0 12px var(--amber-glow);
}

.timeline-item h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.passion-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.passion-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 165, 116, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.passion-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.passion-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.passion-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.passion-card[data-theme="kart"] { --accent: #ff6b4a; }
.passion-card[data-theme="fish"] { --accent: var(--teal); }
.passion-card[data-theme="diy"] { --accent: var(--amber); }
.passion-card[data-theme="travel"] { --accent: #a78bfa; }

.passion-card::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 20px;
  border-radius: 2px;
  background: var(--accent, var(--amber));
  opacity: 0.7;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 165, 116, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.project-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #121820, #0a0e14);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.03);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 4px;
}

.project-body h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.project-body h3 a:hover {
  color: var(--amber);
}

.project-url {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

.project-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.project-link {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--amber);
  text-decoration: none;
  transition: color 0.2s;
}

.project-link:hover {
  color: var(--teal);
}

.quote-block {
  margin-top: 60px;
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at top left, rgba(212, 165, 116, 0.08), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(45, 212, 191, 0.06), transparent 50%),
    var(--card);
}

.quote-block blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  line-height: 1.5;
  color: var(--text);
}

.quote-block cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-mail {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 212, 191, 0.35);
  transition: color 0.2s, border-color 0.2s;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-mail:hover {
  color: var(--amber);
  border-color: rgba(212, 165, 116, 0.5);
}

.footer {
  margin-top: 100px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
}

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

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 960px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 9;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(72px + env(safe-area-inset-top)) 16px 24px;
    background: rgba(7, 10, 16, 0.96);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: min(100%, 360px);
  }

  .nav-links a {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-soft);
    font-size: 1rem;
    text-align: center;
  }

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

  .hero-photo {
    order: -1;
    max-width: min(260px, 72vw);
    margin: 0 auto;
  }

  .bio-timeline,
  .origin-grid,
  .passion-grid {
    grid-template-columns: 1fr;
  }

  .passion-grid {
    gap: 16px;
  }

  .passion-card {
    padding: 24px 20px;
  }

  .hero { min-height: auto; padding-bottom: 40px; }

  section { padding-top: 72px; }

  .quote-block {
    margin-top: 40px;
    padding: 24px 20px;
  }

  .footer {
    margin-top: 72px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
    padding-bottom: 64px;
  }

  .hero {
    padding: 24px 0 32px;
  }

  .hero-badge {
    font-size: 0.78rem;
    margin-bottom: 20px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .bio-timeline {
    margin-top: 32px;
    padding-left: 20px;
  }

  .bio-item::before {
    left: -27px;
  }

  .bio-item h3 {
    font-size: 1rem;
  }

  .project-body {
    padding: 20px;
  }

  .scroll-hint {
    padding-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
}
