/* ============================================================
   personal.css
   HST background, centered cream panel, hello intro
   ============================================================ */

:root {
  --bg:        #08090e;
  --shell:     #ecebe6;          /* warm cream panel */
  --shell-2:   #e2e0d8;          /* slightly deeper panel band */
  --ink:       #1a1a1d;          /* near-black body text */
  --ink-2:     #4a4a52;
  --ink-3:     #7a7a82;
  --line:      #d4d2cb;
  --accent:    #2a3e7e;          /* deep ink-blue */
  --accent-2:  #1f2d5e;
  --radius:    8px;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-multilang: 'Inter', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans Devanagari', 'Noto Sans Gujarati', 'Noto Sans Arabic', system-ui, sans-serif;
}

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

/* HST Deep Field as a fixed background. Subtle gradient deepens the
   edges so the cream panel reads cleanly. */
body {
  background:
    linear-gradient(
      to bottom,
      rgba(4, 5, 10, 0.55) 0%,
      rgba(4, 5, 10, 0.65) 50%,
      rgba(4, 5, 10, 0.75) 100%
    ),
    url('../Images/K2.jpg') center center / cover fixed no-repeat;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.intro-active { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   Intro overlay (unchanged behaviour, dark to match HST)
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  background: #08090e;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.intro--out { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-row {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-multilang);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.01em;
  color: #f3f1ee;
  animation: introIn 0.5s ease both;
}
@keyframes introIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.intro-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f3f1ee;
  flex-shrink: 0;
  animation: bulletPulse 1.4s ease-in-out infinite;
}
@keyframes bulletPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}
.intro-word {
  display: inline-block;
  min-width: 1ch;
  animation: wordFlash 0.1s ease;
}
@keyframes wordFlash {
  from { opacity: 0.4; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.intro-skip {
  position: absolute;
  bottom: 28px;
  right: 28px;
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.intro-skip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }

/* ============================================================
   Page + shell
   ============================================================ */
.page {
  opacity: 0;
  transition: opacity 0.9s ease 0.1s;
  padding: 56px 24px 80px;
}
body:not(.intro-active) .page { opacity: 1; }

.shell {
  max-width: 900px;
  margin: 0 auto;
  background: var(--shell);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.25);
  padding: 56px clamp(28px, 5vw, 64px) 48px;
  position: relative;
}

/* Soft top edge highlight on the shell, like aged paper */
.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Shell head
   ============================================================ */
.shell-head {
  text-align: center;
  position: relative;
  padding-bottom: 28px;
  margin-bottom: 0;
}
.back-link {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}
.back-link:hover { color: var(--ink); border-color: var(--ink-3); }

.shell-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 50px);
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.05;
}
.shell-title a { text-decoration: none; color: inherit; }
.shell-title .bat { color: inherit; }

/* Footer line on every page, replacing the old academic link. */
.shell-foot .im-batman {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.shell-tag {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
}

/* ============================================================
   Shell nav (sections)
   ============================================================ */
.shell-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 16px 0;
  margin: 16px -16px 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.shell-nav a {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.18s, color 0.18s;
}
.shell-nav a:hover {
  color: var(--accent);
  background: rgba(42, 62, 126, 0.08);
}
.shell-nav a.active {
  color: #fff;
  background: var(--accent);
}
.shell-nav a.active:hover {
  background: var(--accent-2);
}

/* ============================================================
   Sections
   ============================================================ */
.shell-section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.shell-section:first-of-type { border-top: 0; padding-top: 12px; }

.shell-section h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.005em;
  color: var(--ink);
}
.shell-p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 60ch;
}
.sub {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  color: var(--accent);
}
.bright-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 62, 126, 0.35);
  padding-bottom: 1px;
  transition: border-color 0.18s, color 0.18s;
}
.bright-link:hover { color: var(--accent-2); border-color: var(--accent); }

/* ============================================================
   About: portrait + text
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}
.about-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  filter: grayscale(20%) contrast(1.05);
}
.about-caption {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.4;
}
.about-text p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.7;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 62, 126, 0.35);
  padding-bottom: 1px;
  transition: border-color 0.18s, color 0.18s;
}
.about-text a:hover { color: var(--accent-2); border-color: var(--accent); }

/* Simple black call-out link (e.g. the YouTube channel) */
.about-text a.hl {
  color: #111;
  font-weight: 700;
  border-bottom: 2px solid #111;
}
.about-text a.hl:hover { color: #000; border-color: #000; }

/* ============================================================
   Two-column lists (Books)
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.plain-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.plain-list li:first-child { border-top: 0; padding-top: 0; }
.item-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.item-meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
}

/* ============================================================
   Blog list (clickable rows)
   ============================================================ */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.2s;
}
.link-list a:hover { color: var(--accent); }
.link-list .item-meta { white-space: nowrap; font-style: normal; }

/* ============================================================
   Under-construction message (Blogs page)
   ============================================================ */
.under-construction {
  text-align: center;
  padding: 60px 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}
.construction-tag {
  margin: 0 0 8px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.under-construction h2 { margin: 0 0 10px; }
.under-construction .shell-p {
  margin: 0 auto;
  max-width: 44ch;
  color: var(--ink-2);
}

/* ============================================================
   Jokes (blockquote rail)
   ============================================================ */
.joke-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.joke-list blockquote {
  margin: 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: rgba(42, 62, 126, 0.05);
  border-radius: 0 6px 6px 0;
}
.joke-list blockquote p {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.55;
}
.joke-list blockquote cite {
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
}

/* ============================================================
   Gallery
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gallery-tile {
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.04) 6px,
      transparent 6px,
      transparent 12px
    ),
    var(--shell-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.gallery-tile:hover {
  border-color: var(--ink-3);
  transform: translateY(-1px);
}
.tile-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   Footer
   ============================================================ */
.shell-foot {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-3);
}
.shell-foot a {
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.18s;
}
.shell-foot a:hover { color: var(--ink); }

.shell-foot .foot-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 14px;
  align-items: center;
}
.shell-foot .foot-links a {
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.shell-foot .foot-links a:hover {
  border-color: var(--ink-3);
}

@media (max-width: 560px) {
  .shell-foot {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .page { padding: 32px 16px 48px; }
  .shell { padding: 40px 22px 32px; }
  .back-link { position: static; display: inline-block; margin-bottom: 16px; }
  .shell-head { text-align: left; padding-bottom: 16px; }
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .about-img { max-width: 220px; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Reduced motion / smaller backgrounds
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .intro-row, .intro-word, .intro-bullet { animation: none; }
  .page { transition: none; }
  body { background-attachment: scroll; }
}
