/* ═══════════════════════════════════════════
   INK & SIGNAL — Mobile Stylesheet (≤800px)
   ═══════════════════════════════════════════ */

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

:root {
  --bg:       #f5f0e8;
  --surface:  #ffffff;
  --text:     #1a1a1a;
  --text-secondary: #5a5a5a;
  --accent:   #c84b31;
  --accent-hover: #a83a22;
  --teal:     #4a9e8e;
  --border:   rgba(0,0,0,0.08);
  --mono:     'IBM Plex Mono', 'Menlo', monospace;
  --serif:    'Cormorant Garamond', 'Georgia', serif;
  --sans:     'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

.dark {
  --bg:       #0d0d0d;
  --surface:  #161616;
  --text:     #e8e4de;
  --text-secondary: #9a9590;
  --accent:   #e8654a;
  --accent-hover: #ff7a5c;
  --teal:     #5bbfad;
  --border:   rgba(255,255,255,0.06);
}

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.4s var(--ease);
}

/* --- Noise Overlay --- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
.dark .noise { opacity: 0.035; }

/* --- Theme Toggle --- */
#theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.toggle-icon {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: background 0.3s, clip-path 0.4s var(--ease);
  clip-path: circle(50% at 50% 50%);
}

.dark .toggle-icon {
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
  background: #fbbf24;
}

/* --- Page Layout --- */
.page {
  max-width: 100%;
  padding: 60px 20px 40px;
}

/* --- Hero --- */
.hero {
  position: relative;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.hero__stamp {
  position: absolute;
  top: -6px;
  right: 0;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 300;
  color: var(--accent);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: 4px;
}

.hero__name {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}

.hero__name-first { font-weight: 600; }
.hero__name-last { font-weight: 300; margin-left: 8px; }

.hero__title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.link {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.25s;
}

.link:not(:last-child)::after {
  content: '/';
  margin: 0 10px;
  color: var(--border);
  pointer-events: none;
}

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

/* --- Content --- */
.content { display: flex; flex-direction: column; gap: 40px; }

.section__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section__heading-jp {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.section__heading-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section__subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-style: italic;
}

/* --- About --- */
.about__text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 20px;
}

.about__contact {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 16px 18px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  transition: background 0.4s var(--ease);
}

.dark .about__contact { background: rgba(255,255,255,0.03); }

.about__contact a {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
}

/* --- Timeline --- */
.timeline { display: flex; flex-direction: column; }

.timeline__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.timeline__item:last-child { border-bottom: none; }

.timeline__date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.timeline__company {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
}

.timeline__role {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Education --- */
.edu__school {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.edu__degree {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}

.edu__location {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.edu__details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* --- Skills --- */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  transition: all 0.3s var(--ease);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Tools --- */
.tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.tool-card:hover::before { transform: scaleX(1); }

.dark .tool-card { background: rgba(255,255,255,0.03); }

.tool-card__name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

.tool-card__desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.tool-card__arrow {
  font-size: 16px;
  color: var(--accent);
  margin-top: 12px;
  align-self: flex-end;
}

/* --- Interests --- */
.interests {
  font-size: 13px;
  color: var(--text-secondary);
}

.interests a {
  color: var(--accent);
  text-decoration: none;
}

/* --- Footer --- */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__mark {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 4px;
  opacity: 0.4;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

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

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

/* --- Selection --- */
::selection {
  background: var(--accent);
  color: #fff;
}
