/* Tokens */
:root {
  --navy:       #1a2c47;
  --navy-mid:   #243656;
  --blue-mid:   #4e6097;
  --bluebell:   #6e5db8;
  --bluebell-lt:#b8aee8;
  --gold:       #c8981a;
  --gold-bg:    #fdf6e3;
  --gold-border:#e8d48a;
  --off-white:  #f8f7f4;
  --white:      #ffffff;
  --text-body:  #2a2a3e;
  --text-muted: #565670;
  --border:     rgba(26,44,71,0.1);
  --border-md:  rgba(26,44,71,0.18);

  --font-display: 'Raleway', sans-serif;
  --font-body:    'Lato', sans-serif;
  --font-mono:    'Inconsolata', monospace;
  --font-jp:      'Zen Old Mincho', serif;

  --max-w:  900px;
  --pad:    32px;
  --radius: 8px;
  --radius-lg: 14px;
  --ease:   0.2s ease;

  /* Project thumbnail palette (soft) */
  --proj-bg-ppda: linear-gradient(160deg, rgba(248,247,244,0.96) 0%, rgba(110,93,184,0.16) 100%);
  --proj-bg-fog: linear-gradient(160deg, rgba(248,247,244,0.94) 0%, rgba(200,152,26,0.22) 100%);
  --proj-bg-dataset: linear-gradient(160deg, rgba(248,247,244,0.96) 0%, rgba(78,96,151,0.18) 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text-body);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,247,244,0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-gradient-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--bluebell) 55%, var(--gold) 100%);
}
.nav-wordmark {
  font-family: var(--font-display); font-size: 14px; font-weight: 800;
  color: var(--navy); letter-spacing: -0.01em;
}
.nav-wordmark span { font-weight: 300; opacity: 0.32; margin-left: 3px; }
.nav-links { display: flex; gap: 0; list-style: none; align-items: center; height: 56px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted);
  letter-spacing: 0.03em; padding: 0 14px; height: 56px;
  display: flex; align-items: center;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.nav-links a:hover { color: var(--blue-mid); }
.nav-links a.active { color: var(--navy); border-bottom-color: var(--bluebell); }

.nav-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 4px; padding: 4px;
  align-items: flex-end;
}
.nav-menu-btn span {
  width: 20px; height: 2px;
  background: var(--navy);
  border-radius: 1px;
  transition: all 0.3s ease;
}
.nav-menu-btn span:nth-child(1) { width: 20px; }
.nav-menu-btn span:nth-child(2) { width: 15px; }
.nav-menu-btn span:nth-child(3) { width: 20px; }

/* Hero */
#hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://res.cloudinary.com/nobuyukioishi-com/image/upload/v1774432757/nobuyukioishi.com/brighton-beach-1920w_warurv.png');
  background-size: cover;
  background-position: center 62%;
  opacity: 0.14;
  pointer-events: none;
}
.hero-body {
  position: relative; z-index: 2;
  padding: 64px 0 56px;
}
.hero-container {
  position: relative;
  z-index: 2;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 180px;
  gap: 48px; align-items: start;
}
.hero-name {
  font-family: var(--font-display); font-size: clamp(42px, 6.5vw, 64px);
  font-weight: 800; color: var(--navy); letter-spacing: -0.03em;
  line-height: 0.95; margin-bottom: 10px;
}
.hero-name .last { font-weight: 300; opacity: 0.30; margin-left: 8px; }
.hero-role {
  font-family: var(--font-body); font-style: italic; font-size: 19px;
  font-weight: 300; color: var(--blue-mid); margin-bottom: 22px;
}
.hero-divider {
  width: 36px; height: 3px;
  background: linear-gradient(90deg, var(--bluebell), var(--gold));
  border-radius: 2px; margin-bottom: 20px;
}
.hero-bio {
  font-size: 17px; font-weight: 300; color: var(--text-body);
  line-height: 1.82; max-width: 570px; margin-bottom: 20px;
}
.hero-bio .hl { color: var(--bluebell); font-weight: 400; }
.hero-bio .pill {
  background: rgba(110,93,184,0.1); color: var(--bluebell);
  border-radius: 4px; padding: 1px 6px; font-weight: 400;
}
.hero-now {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--gold-bg); border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px; max-width: 500px; margin-bottom: 28px;
}
.now-label {
  font-family: var(--font-mono); font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gold); white-space: nowrap; padding-top: 2px;
}
.now-text { font-size: 14px; font-weight: 300; color: #6b4f0a; line-height: 1.6; }
.hero-links { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.hlink {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em;
  padding: 6px 14px; border-radius: 40px;
  border: 1px solid var(--border-md); color: var(--blue-mid);
  background: rgba(255,255,255,0.85); white-space: nowrap;
  transition: all var(--ease);
}
.hlink:hover { border-color: var(--bluebell); color: var(--bluebell); background: #fff; }

.hero-avatar {
  display: none;
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 40px;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 12px rgba(110,93,184,0.12);
}

/* Photo */
.hero-photo-col { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 6px; }
.hero-photo {
  width: 180px; height: 224px; object-fit: cover; object-position: center 15%;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(26,44,71,0.13);
}

/* Sections */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 40px; }
.sec-num { font-family: var(--font-mono); font-size: 14px; color: var(--bluebell-lt); letter-spacing: 0.05em; }
.sec-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }

/* About */
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
.about-text p { font-size: 16px; font-weight: 300; color: var(--text-body); line-height: 1.85; }
.about-text p + p { margin-top: 16px; }
.about-adventure {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 8px;
}
.about-adventure-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 6px;
}
.about-adventure-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.motto-block { padding-top: 4px; }
.motto-label {
  font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--bluebell-lt); margin-bottom: 10px;
}
.motto-jp {
  font-family: var(--font-jp); font-size: 26px; color: var(--navy);
  letter-spacing: 0.05em; line-height: 1.4; opacity: 0.75; margin-bottom: 8px;
}
.motto-divider {
  width: 20px; height: 2px;
  background: linear-gradient(90deg, var(--bluebell), var(--gold));
  border-radius: 2px; margin-bottom: 8px;
}
.motto-tr {
  font-family: var(--font-body); font-style: italic; font-size: 14px;
  color: var(--text-muted); font-weight: 300; line-height: 1.7;
}
.facts-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.fact-label {
  font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--bluebell); margin-bottom: 3px;
}
.fact-value { font-size: 13.5px; color: var(--navy); font-weight: 400; line-height: 1.55; }

/* Publications */
.pub-list { display: flex; flex-direction: column; gap: 8px; }
.pub {
  display: grid; grid-template-columns: 28px 1fr; gap: 0 16px;
  padding: 18px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--white);
  transition: border-color var(--ease), transform var(--ease);
}
.pub:hover { border-color: var(--bluebell-lt); transform: translateX(3px); }
.pub-n { font-family: var(--font-mono); font-size: 11px; color: var(--bluebell-lt); padding-top: 2px; }
.pub-title { font-size: 15px; font-weight: 400; color: var(--navy); line-height: 1.55; margin-bottom: 5px; }
.pub-authors { font-size: 13px; color: var(--text-muted); font-weight: 300; margin-bottom: 5px; line-height: 1.5; }
.pub-name { color: var(--bluebell); font-weight: 400; }
.pub-venue { font-family: var(--font-mono); font-size: 10.5px; color: var(--blue-mid); letter-spacing: 0.02em; margin-bottom: 8px; }
.badge {
  display: inline-block; font-size: 9.5px; padding: 1px 7px; border-radius: 10px;
  margin-left: 6px; background: rgba(200,152,26,0.12); color: #8a6010;
  font-family: var(--font-mono); vertical-align: middle;
}
.pub-links { display: flex; gap: 6px; }
.pub-link {
  font-family: var(--font-mono); font-size: 10px; padding: 3px 10px;
  border-radius: 20px; border: 1px solid var(--border);
  color: var(--blue-mid); background: var(--off-white);
  transition: all var(--ease);
}
.pub-link:hover { border-color: var(--blue-mid); }
.pub-link.fig {
  border-color: rgba(110,93,184,0.25); color: var(--bluebell);
  background: rgba(110,93,184,0.05);
}
.pub-link.fig:hover { border-color: var(--bluebell); }
.scholar-link { margin-top: 16px; }

/* Projects */
.project-list { display: flex; flex-direction: column; gap: 10px; }
.project-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--white);
  display: flex; flex-direction: row;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.project-card:hover {
  border-color: var(--bluebell-lt);
  box-shadow: 0 4px 20px rgba(110,93,184,0.08);
}
.project-thumb {
  width: 200px; flex-shrink: 0; height: 180px;
  display: block;
}
.project-thumb-media {
  width: 200px;
  flex-shrink: 0;
  min-height: 180px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--proj-bg-ppda);
}
.project-thumb-media-ppda { background: var(--proj-bg-ppda); }
.project-thumb-media-dataset { background: var(--proj-bg-dataset); }
img.project-thumb-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.project-thumb-media-video {
  padding: 8px;
  background: var(--proj-bg-fog);
}
.project-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.project-body { padding: 20px 22px; flex: 1; }
.project-type {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px;
}
.project-name {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--navy); letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 8px;
}
.project-desc { font-size: 14px; font-weight: 300; color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }
.project-desc .hl {
  color: var(--bluebell); font-weight: 400;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-family: var(--font-mono); font-size: 10px; padding: 2px 9px;
  border-radius: 12px; background: var(--off-white);
  color: var(--blue-mid); border: 1px solid var(--border);
}

/* Contact */
#contact {
  position: relative;
  overflow: hidden;
}
.contact-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('https://res.cloudinary.com/nobuyukioishi-com/image/upload/v1774432757/nobuyukioishi.com/birighton-beach-sunset-1920w_v8f06o.png');
  background-size: cover;
  background-position: center 40%;
  opacity: 0.40;
  pointer-events: none;
}
.contact-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(248,247,244,0.62) 0%, rgba(248,247,244,0.46) 60%, rgba(248,247,244,0.32) 100%);
  pointer-events: none;
}
.contact-intro {
  font-size: 16px; font-weight: 300; color: var(--text-muted);
  line-height: 1.8; max-width: 600px; margin-bottom: 24px;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 420px; }
.contact-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--white);
  transition: all var(--ease);
}
.contact-card:hover { border-color: var(--bluebell-lt); background: #f8f7ff; }
.c-icon {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--off-white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--bluebell); flex-shrink: 0;
}
.c-label { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 2px; }
.c-value { font-size: 14px; color: var(--navy); font-weight: 400; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 36px var(--pad);
  background: var(--off-white);
  text-align: center;
}
.footer-icon { margin: 0 auto 10px; opacity: 1.0; width: 36px; height: 36px; object-fit: contain; display: block; }
.footer-copy { font-family: var(--font-mono); font-size: 10.5px; color: #c5c3be; letter-spacing: 0.02em; }

/* Generic link button */
.btn {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em;
  padding: 7px 16px; border-radius: 40px; border: 1px solid var(--border-md);
  color: var(--blue-mid); background: var(--white); display: inline-block;
  transition: all var(--ease);
}
.btn:hover { border-color: var(--bluebell); color: var(--bluebell); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

/* Responsive */
@media (max-width: 640px) {
  :root { --pad: 20px; }
  
  /* Nav mobile */
  .nav-menu-btn { display: flex; }
  .nav-links {
    display: flex !important;
    flex-direction: column !important;
    position: absolute; top: 56px; left: 0; right: 0;
    height: auto !important;
    gap: 0;
    background: rgba(248,247,244,0.98); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: stretch !important;
  }
  .nav-links.active {
    max-height: 500px;
  }
  .nav-links li {
    display: block;
  }
  .nav-links a {
    display: flex !important;
    align-items: center !important;
    padding: 14px var(--pad) !important;
    height: auto !important;
    min-height: 44px;
    border: none !important;
    border-bottom: 1px solid var(--border-md);
    font-size: 12.5px !important;
  }
  .nav-links a.active {
    background: rgba(110,93,184,0.05);
    border-bottom-color: var(--bluebell) !important;
  }
  
  .hero-body { padding: 32px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-avatar { display: block; }
  .hero-photo-col { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .facts-strip { grid-template-columns: 1fr 1fr; }
  .project-card { flex-direction: column; }
  .project-thumb, .project-thumb-media { width: 100%; height: 200px; }
  .contact-grid { grid-template-columns: 1fr; max-width: 100%; }
}
