@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Noto+Serif+JP:wght@700;900&display=swap');

:root {
  --bg: #f0f4f8;
  --bg-2: #e8edf2;
  --surface: rgba(255,255,255,0.6);
  --surface-solid: #ffffff;
  --border-clr: rgba(15,23,42,0.07);
  --border-strong: rgba(15,23,42,0.13);
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted-clr: #475569;
  --primary-clr: #3b82f6;
  --primary-soft: #60a5fa;
  --accent-clr: #f43f5e;
  --sakura-soft: #e8b4b8;
  --sakura-muted: #d4a0a5;
  --cyan: #22d3ee;
  --grad-text: linear-gradient(135deg,#1e40af 0%, #3b82f6 50%, #0ea5e9 100%);
  --grad-text-2: linear-gradient(135deg,#0f766e 0%, #3b82f6 100%);
  --grad-btn: linear-gradient(135deg,#3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
  --grad-line: linear-gradient(180deg,#3b82f6, #818cf8, #60a5fa);
  --sh-sm: 0 4px 12px rgba(30,64,175,0.06);
  --sh-md: 0 12px 32px rgba(30,64,175,0.10);
  --sh-lg: 0 24px 60px rgba(30,64,175,0.14);
  --radius-port: 18px;
  --radius-sm-port: 12px;
  --radius-lg-port: 28px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(59,130,246,0.12), transparent 60%),
    radial-gradient(1000px 500px at -10% 20%, rgba(129,140,248,0.12), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(216,168,173,0.15), transparent 60%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== ENTRANCE ANIMATION ===== */
@keyframes page-enter {
  from { opacity: 0; filter: blur(8px); }
  to { opacity: 1; filter: blur(0); }
}
body { animation: page-enter 1.2s ease-out; }

/* ===== SAKURA PETALS ===== */
@keyframes sakura-fall {
  0% { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 1; }
  25% { transform: translateY(25vh) translateX(30px) rotate(90deg); opacity: 0.9; }
  50% { transform: translateY(50vh) translateX(-20px) rotate(180deg); opacity: 0.8; }
  75% { transform: translateY(75vh) translateX(40px) rotate(270deg); opacity: 0.5; }
  100% { transform: translateY(105vh) translateX(-10px) rotate(360deg); opacity: 0; }
}
.sakura-petal {
  position: fixed; width: 12px; height: 12px;
  background: radial-gradient(circle at 30% 30%, #d4a0a5, #c9969b 40%, #dbb0b5 80%);
  border-radius: 150% 0 150% 0;
  opacity: 0; z-index: 0; pointer-events: none;
  animation: sakura-fall linear infinite; filter: blur(0.3px);
}
.sakura-petal:nth-child(1) { left: 5%; width: 10px; height: 10px; animation-duration: 11s; animation-delay: 0s; }
.sakura-petal:nth-child(2) { left: 15%; width: 14px; height: 14px; animation-duration: 14s; animation-delay: 2s; }
.sakura-petal:nth-child(3) { left: 25%; width: 8px; height: 8px; animation-duration: 10s; animation-delay: 4s; }
.sakura-petal:nth-child(4) { left: 35%; width: 12px; height: 12px; animation-duration: 13s; animation-delay: 1s; }
.sakura-petal:nth-child(5) { left: 45%; width: 10px; height: 10px; animation-duration: 15s; animation-delay: 3s; }
.sakura-petal:nth-child(6) { left: 55%; width: 16px; height: 16px; animation-duration: 12s; animation-delay: 5s; }
.sakura-petal:nth-child(7) { left: 65%; width: 9px; height: 9px; animation-duration: 11s; animation-delay: 0.5s; }
.sakura-petal:nth-child(8) { left: 75%; width: 13px; height: 13px; animation-duration: 16s; animation-delay: 2.5s; }
.sakura-petal:nth-child(9) { left: 85%; width: 11px; height: 11px; animation-duration: 10s; animation-delay: 4.5s; }
.sakura-petal:nth-child(10) { left: 92%; width: 15px; height: 15px; animation-duration: 14s; animation-delay: 1.5s; }
.sakura-petal:nth-child(11) { left: 10%; width: 7px; height: 7px; animation-duration: 17s; animation-delay: 6s; }
.sakura-petal:nth-child(12) { left: 50%; width: 10px; height: 10px; animation-duration: 13s; animation-delay: 7s; }
.sakura-petal:nth-child(13) { left: 70%; width: 14px; height: 14px; animation-duration: 11s; animation-delay: 3.5s; }
.sakura-petal:nth-child(14) { left: 30%; width: 9px; height: 9px; animation-duration: 15s; animation-delay: 8s; }
.sakura-petal:nth-child(15) { left: 80%; width: 11px; height: 11px; animation-duration: 12s; animation-delay: 5.5s; }

/* ===== SAKURA TREE BRANCHES ===== */
.sakura-tree-left, .sakura-tree-right { position: fixed; z-index: 0; pointer-events: none; opacity: 0.35; }
.sakura-tree-left { top: -20px; left: -40px; width: 320px; height: 400px; }
.sakura-tree-right { top: -10px; right: -30px; width: 280px; height: 360px; transform: scaleX(-1); }
.sakura-branch { position: absolute; border-radius: 40%; }
.sakura-branch-main { width: 8px; height: 280px; background: linear-gradient(180deg, #8b6f5c, #a08070); transform: rotate(25deg); top: 60px; left: 100px; border-radius: 4px; }
.sakura-branch-sub { width: 5px; height: 140px; background: linear-gradient(180deg, #a08070, #b89888); transform: rotate(-30deg); top: 80px; left: 130px; border-radius: 3px; }
.sakura-branch-sub2 { width: 4px; height: 100px; background: linear-gradient(180deg, #a08070, #c0a898); transform: rotate(50deg); top: 120px; left: 60px; border-radius: 3px; }
.sakura-bloom { position: absolute; border-radius: 50%; filter: blur(12px); animation: bloom-pulse 4s ease-in-out infinite; }
@keyframes bloom-pulse { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 0.75; transform: scale(1.08); } }
.bloom-1 { width: 80px; height: 80px; background: #d4a0a5; top: 20px; left: 60px; animation-delay: 0s; }
.bloom-2 { width: 100px; height: 100px; background: #c9969b; top: 50px; left: 120px; animation-delay: 1s; }
.bloom-3 { width: 60px; height: 60px; background: #dbb0b5; top: 10px; left: 150px; animation-delay: 2s; }
.bloom-4 { width: 70px; height: 70px; background: #e0c4c7; top: 80px; left: 40px; animation-delay: 0.5s; }
.bloom-5 { width: 90px; height: 90px; background: #c9969b; top: 30px; left: 200px; animation-delay: 1.5s; }
.bloom-6 { width: 50px; height: 50px; background: #d4a0a5; top: 100px; left: 160px; animation-delay: 3s; }

/* ===== FLOATING BLOBS ===== */
.blob { position: fixed; border-radius: 50%; filter: blur(70px); opacity: .45; z-index: -1; animation: floaty 12s ease-in-out infinite; }
.blob-1 { width: 380px; height: 380px; background: #93c5fd; top: -80px; left: -80px; }
.blob-2 { width: 340px; height: 340px; background: #a5b4fc; top: 30%; right: -100px; animation-delay: -3s; }
.blob-3 { width: 300px; height: 300px; background: #d4a0a5; bottom: 10%; left: -60px; animation-delay: -6s; }
.blob-4 { width: 260px; height: 260px; background: #bfdbfe; bottom: -80px; right: 20%; animation-delay: -9s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-30px) translateX(20px); } }

/* ===== ANIMATED GLOW LINES (section dividers) ===== */
.glow-divider {
  width: 100%; max-width: 600px; height: 2px; margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.4), rgba(212,160,165,0.4), transparent);
  border-radius: 2px;
  animation: glow-shift 4s ease-in-out infinite;
}
@keyframes glow-shift {
  0%, 100% { opacity: 0.4; transform: scaleX(0.8); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* ===== NAV ===== */
.port-nav {
  position: sticky; top: 16px; z-index: 50;
  margin: 16px auto 0; max-width: 1100px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-clr); border-radius: 999px;
  box-shadow: var(--sh-sm);
  animation: nav-slide 0.8s ease-out;
}
@keyframes nav-slide {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.port-logo { font-weight: 800; letter-spacing: .2px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.port-nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.port-nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink-soft);
  font-weight: 500; font-size: .92rem; transition: all .25s ease;
  position: relative;
}
.port-nav-links a::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; width: 0; height: 2px;
  background: var(--primary-clr); border-radius: 2px;
  transition: all .3s ease; transform: translateX(-50%);
}
.port-nav-links a:hover { background: rgba(59,130,246,0.12); color: var(--primary-clr); }
.port-nav-links a:hover::after { width: 60%; }

/* ===== SECTION LAYOUT ===== */
.port-section { max-width: 1100px; margin: 120px auto; padding: 0 22px; position: relative; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.port-tag {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(59,130,246,0.12); color: var(--primary-clr);
  font-size: .78rem; font-weight: 600; letter-spacing: .4px; margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head p { margin-top: 10px; color: var(--muted-clr); }

/* ===== HERO ===== */
.port-hero { position: relative; margin-top: 60px; padding: 90px 22px 40px; }
.hero-inner { max-width: 900px; margin: 0 auto; text-align: center; }

/* Kanji watermark */
.hero-kanji {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: 'Noto Serif JP', serif; font-size: clamp(12rem, 25vw, 22rem);
  font-weight: 900; color: rgba(59,130,246,0.03); z-index: 0; pointer-events: none;
  user-select: none; animation: kanji-float 10s ease-in-out infinite;
}
@keyframes kanji-float {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.03; }
  50% { transform: translate(-50%, -52%) scale(1.02); opacity: 0.05; }
}

.avatar-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 26px; animation: bob 6s ease-in-out infinite; z-index: 1; }
.avatar {
  width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: 0 16px 40px rgba(59,130,246,0.2);
  position: relative; z-index: 2; background: #eef2ff;
}
.avatar-ring {
  position: absolute; inset: -10px; border-radius: 50%;
  background: conic-gradient(from 0deg,#3b82f6,#60a5fa,#93c5fd,#d4a0a5,#3b82f6);
  filter: blur(8px); opacity: .6; animation: spin 14s linear infinite;
}
.avatar-dot {
  position: absolute; right: 6px; bottom: 10px; width: 18px; height: 18px; border-radius: 50%;
  background: #34d399; border: 3px solid #fff; z-index: 3;
  box-shadow: 0 0 0 4px rgba(52,211,153,.25); animation: breathe 2.4s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: .85; } }

.kicker {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.7); backdrop-filter: blur(10px);
  border: 1px solid var(--border-clr); color: var(--ink-soft);
  font-size: .82rem; font-weight: 600; margin-bottom: 18px; box-shadow: var(--sh-sm);
  position: relative; z-index: 1;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; color: var(--ink); position: relative; z-index: 1; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text-2 { background: var(--grad-text-2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 22px auto 0; max-width: 620px; color: var(--muted-clr); font-size: 1.05rem; position: relative; z-index: 1; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; position: relative; z-index: 1; }

.port-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: all .3s cubic-bezier(.2,.8,.2,1); border: 1px solid transparent;
  position: relative; overflow: hidden;
}
.port-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity .3s ease;
}
.port-btn:hover::before { opacity: 1; }
.port-btn .arrow { font-style: normal; transition: transform .3s ease; }
.port-btn:hover .arrow { transform: translateX(4px); }
.port-btn-primary { color: #fff; background: var(--grad-btn); box-shadow: 0 10px 24px rgba(59,130,246,.35); }
.port-btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 36px rgba(59,130,246,.45); }
.port-btn-ghost { color: var(--ink); background: rgba(255,255,255,.7); border: 1px solid var(--border-strong); backdrop-filter: blur(10px); box-shadow: var(--sh-sm); }
.port-btn-ghost:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--sh-md); background: #fff; }

.hero-stats { margin-top: 60px; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats > div {
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--border-clr); border-radius: var(--radius-port);
  padding: 18px 26px; min-width: 150px; text-align: center; box-shadow: var(--sh-sm);
  transition: all .3s ease;
}
.hero-stats > div:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: rgba(59,130,246,0.2); }
.hero-stats strong { display: block; font-size: 1.6rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.hero-stats span { color: var(--muted-clr); font-size: .85rem; }

/* ===== TIMELINE ===== */
.timeline { list-style: none; position: relative; max-width: 760px; margin: 0 auto; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 3px; background: var(--grad-line); border-radius: 3px; opacity: .55; }
.timeline li { position: relative; margin-bottom: 22px; }
.timeline li::before {
  content: ""; position: absolute; left: -29px; top: 22px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary-soft); box-shadow: 0 0 0 5px rgba(59,130,246,.2);
  transition: all .3s ease;
}
.timeline li:hover::before { box-shadow: 0 0 0 8px rgba(59,130,246,.15), 0 0 20px rgba(59,130,246,0.3); transform: scale(1.3); }
.t-card {
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--border-clr); border-radius: var(--radius-port);
  padding: 18px 22px; box-shadow: var(--sh-sm); transition: all .3s ease;
}
.t-card:hover { transform: translateY(-4px) translateX(4px); box-shadow: var(--sh-md); border-color: rgba(59,130,246,0.15); }
.t-year { display: inline-block; font-family: var(--mono); font-size: .78rem; color: var(--primary-clr); background: rgba(59,130,246,.12); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.t-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.t-card p { color: var(--muted-clr); font-size: .93rem; }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.skill-block {
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--border-clr); border-radius: var(--radius-lg-port);
  padding: 28px; box-shadow: var(--sh-sm);
  transition: all .35s ease;
  position: relative; overflow: hidden;
}
.skill-block::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(59,130,246,0.06) 25%, transparent 50%);
  animation: skill-rotate 8s linear infinite;
  opacity: 0; transition: opacity .4s ease;
}
.skill-block:hover::before { opacity: 1; }
@keyframes skill-rotate { to { transform: rotate(360deg); } }
.skill-block:hover { transform: translateY(-6px); box-shadow: var(--sh-md), 0 0 0 1px rgba(59,130,246,0.1); }
.skill-block h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted-clr); margin-bottom: 18px; font-weight: 700; position: relative; z-index: 1; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.pill {
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem;
  background: linear-gradient(135deg,#dbeafe,#e0e7ff);
  color: #1e40af; border: 1px solid rgba(59,130,246,.15); transition: all .3s ease;
}
.pill:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 22px rgba(59,130,246,.18); background: linear-gradient(135deg,#bfdbfe,#c7d2fe); }

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 24px; }
.project {
  position: relative; background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--border-clr); border-radius: var(--radius-lg-port);
  overflow: hidden; box-shadow: var(--sh-sm); transition: all .35s cubic-bezier(.2,.8,.2,1);
}
.project::before {
  content: ''; position: absolute; inset: -2px; border-radius: inherit; z-index: -1;
  background: conic-gradient(from 0deg, #3b82f6, #22d3ee, #d4a0a5, #3b82f6);
  opacity: 0; transition: opacity .4s ease;
}
.project:hover::before { opacity: 0.3; }
.project::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg,rgba(59,130,246,.12),rgba(212,160,165,.12));
  opacity: 0; transition: opacity .35s ease;
}
.project:hover { transform: translateY(-8px) scale(1.01); box-shadow: var(--sh-lg), 0 0 40px rgba(59,130,246,0.08); border-color: rgba(59,130,246,.35); }
.project:hover::after { opacity: 1; }
.project-cover { height: 160px; border-bottom: 1px solid var(--border-clr); position: relative; overflow: hidden; }
.project-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(255,255,255,0.4) 100%); z-index: 1; }
.cover-1 { background: linear-gradient(135deg,#bfdbfe,#c7d2fe); }
.cover-2 { background: linear-gradient(135deg,#a7f3d0,#bfdbfe); }
.cover-3 { background: linear-gradient(135deg,#fde68a,#bfdbfe); }
.cover-4 { background: linear-gradient(135deg,#c7d2fe,#bae6fd); }
.cover-5 { background: linear-gradient(135deg,#d4a0a5,#c7d2fe); }
.project-cover::after {
  content: "🌸"; position: absolute; top: 12px; right: 16px; font-size: 1.4rem;
  z-index: 2; opacity: 0.7; transition: all .3s ease;
}
.project:hover .project-cover::after { opacity: 1; transform: scale(1.3) rotate(20deg); }
.project-body { padding: 22px; position: relative; z-index: 1; }
.project-body h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.project-body p { color: var(--muted-clr); font-size: .93rem; margin-bottom: 14px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.proj-tags span { font-size: .72rem; padding: 4px 10px; border-radius: 999px; background: rgba(59,130,246,.12); color: var(--primary-clr); font-weight: 600; }
.proj-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .9rem; color: var(--primary-clr);
  padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(212,160,165,0.1));
  border: 1px solid rgba(59,130,246,0.2); transition: all .3s cubic-bezier(.2,.8,.2,1);
}
.proj-link:hover { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(212,160,165,0.2)); transform: translateX(6px); color: var(--accent-clr); box-shadow: 0 4px 16px rgba(59,130,246,0.2); }
.proj-link .arrow-icon { display: inline-block; transition: transform .3s ease; }
.proj-link:hover .arrow-icon { transform: translateX(6px); }

/* ===== CERTS ===== */
.certs-scroll {
  display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 24px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #93c5fd transparent;
}
.certs-scroll::-webkit-scrollbar { height: 8px; }
.certs-scroll::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 8px; }
.cert {
  flex: 0 0 270px; scroll-snap-align: start;
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--border-clr); border-radius: var(--radius-port);
  padding: 24px; box-shadow: var(--sh-sm); transition: all .3s cubic-bezier(.2,.8,.2,1);
  position: relative; overflow: hidden;
}
.cert::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(212,160,165,0.08), rgba(167,243,208,0.06));
  transition: opacity .3s ease; border-radius: inherit;
}
.cert::after {
  content: '✦'; position: absolute; top: 12px; right: 14px;
  font-size: 1rem; opacity: 0; color: var(--primary-clr);
  transition: all .3s ease; transform: rotate(0deg);
}
.cert:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--sh-md), 0 0 0 4px rgba(59,130,246,0.1); border-color: rgba(59,130,246,.35); }
.cert:hover::before { opacity: 1; }
.cert:hover::after { opacity: 1; transform: rotate(180deg); }
.cert h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; position: relative; z-index: 1; }
.cert .cert-tag { display: inline-block; font-size: .72rem; padding: 3px 10px; border-radius: 999px; background: rgba(59,130,246,.12); color: var(--primary-clr); font-weight: 600; position: relative; z-index: 1; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.contact-form {
  background: var(--surface); backdrop-filter: blur(14px);
  border: 1px solid var(--border-clr); border-radius: var(--radius-lg-port);
  padding: 30px; box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 16px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; }
.contact-form span { font-size: .82rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .3px; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 13px 16px; outline: none; transition: all .25s ease; resize: vertical;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #94a3b8; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary-soft); box-shadow: 0 0 0 5px rgba(59,130,246,.2); background: #fefefe; }
.form-submit { align-self: flex-start; margin-top: 6px; }

/* Terminal */
.terminal {
  background: linear-gradient(180deg,#f0f4f8 0%, #e0e7ff 100%);
  border: 1px solid var(--border-clr); border-radius: var(--radius-lg-port);
  box-shadow: var(--sh-md); overflow: hidden; display: flex; flex-direction: column; min-height: 380px;
  position: relative;
}
.terminal::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: conic-gradient(from 45deg, rgba(59,130,246,0.15), rgba(212,160,165,0.15), rgba(34,211,238,0.1), rgba(59,130,246,0.15));
  z-index: -1; opacity: 0; transition: opacity .4s ease;
}
.terminal:hover::before { opacity: 1; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255,255,255,.72); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-clr); }
.term-bar .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.red { background: #d4a0a5; }
.dot.yellow { background: #fcd34d; }
.dot.green { background: #86efac; }
.term-title { margin-left: 8px; font-family: var(--mono); font-size: .75rem; color: var(--muted-clr); }
.term-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  font-family: var(--mono);
  font-size: .84rem;
  color: #3730a3;
  flex: 1;
}
.term-body .term-session { display: flex; flex-direction: column; gap: 3px; }
.term-body .line { margin: 2px 0; line-height: 1.5; }
.term-body .out { color: #6d28d9; }
.term-body .out.ok { color: #0d9488; }
.term-body .label-text { color: var(--muted-clr); margin-top: 6px; font-size: .82rem; }
.term-body .path { color: #6366f1; opacity: .8; }
.term-footer { display: flex; flex-direction: column; gap: 6px; }

.prompt-link { position: relative; color: #1e40af; font-weight: 600; padding: 2px 4px; border-radius: 5px; cursor: pointer; transition: all .25s ease; font-size: .82rem; }
.prompt-link:hover { background: rgba(59,130,246,.1); box-shadow: 0 0 0 3px rgba(59,130,246,.08); text-shadow: 0 0 10px rgba(59,130,246,.25); }
.cursor-blink { display: inline-block; width: 8px; color: #6366f1; animation: blink 1.05s steps(1) infinite; margin-left: 3px; }
@keyframes blink { 50% { opacity: 0; } }

.term-link {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; margin-top: 2px;
  color: #4338ca; font-weight: 500; font-size: .82rem; position: relative; overflow: hidden; transition: all .3s cubic-bezier(.2,.8,.2,1);
}
.term-link .arr { display: inline-block; color: var(--accent-clr); font-weight: 700; transition: transform .3s ease; }
.term-link .lk-name { color: #1e40af; font-weight: 600; }
.term-link .lk-val { color: var(--muted-clr); transition: all .3s ease; opacity: .85; }
.term-link::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg,rgba(59,130,246,.15),rgba(212,160,165,.15)); transition: width .4s ease; z-index: -1; }
.term-link:hover { transform: translateX(4px); }
.term-link:hover::before { width: 100%; }
.term-link:hover .arr { transform: translateX(4px) scale(1.2); color: #f43f5e; }
.term-link:hover .lk-val { color: var(--ink); opacity: 1; }

/* ===== FOOTER ===== */
.port-footer { text-align: center; padding: 60px 22px 40px; color: var(--muted-clr); font-size: .9rem; }
.port-footer .muted-text { opacity: .7; margin-top: 4px; font-size: .82rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .port-nav { margin: 12px 12px 0; padding: 10px 14px; }
  .port-nav-links { gap: 2px; }
  .port-nav-links a { padding: 6px 10px; font-size: .85rem; }
  .port-section { margin: 90px auto; }
  .port-hero { padding-top: 60px; }
  .hero-stats > div { min-width: 130px; padding: 14px 18px; }
  .sakura-tree-left, .sakura-tree-right { width: 200px; height: 260px; }
}
@media (max-width: 480px) {
  .port-nav-links a:not(:first-child):not(:last-child) { display: none; }
  .hero-stats { gap: 10px; }
  .hero-stats > div { min-width: 100px; padding: 12px 14px; }
  .sakura-tree-left, .sakura-tree-right { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-kanji { font-size: 10rem; }
}

/* ===== RESPONSIVE LAYOUT SAFEGUARDS ===== */
/* Keep the complete hero and its statistics inside the phone scroll flow. */
@media (max-width: 560px) {
  .port-hero {
    min-height: 0;
    padding: 56px 18px 32px;
    overflow: visible;
  }

  .avatar-wrap {
    width: 120px;
    height: 120px;
    margin-bottom: 18px;
  }

  .avatar { width: 120px; height: 120px; }
  .hero-sub { margin-top: 16px; }
  .hero-cta { margin-top: 24px; }
  .hero-stats { margin-top: 28px; }
  .hero-inner { gap: 28px; }
  .hero-visual { min-height: 250px; }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0;
    margin-top: 0;
    padding-top: 20px;
  }

  .hero-stats > div,
  .hero-stats > div + div {
    min-width: 0;
    padding: 0 8px;
    text-align: center;
  }

  .hero-stats strong { font-size: 1.35rem; }
  .hero-stats span { display: block; font-size: .72rem; line-height: 1.35; }
}

/* Show complete certificate cards at tablet and phone widths instead of a clipped sliver. */
@media (max-width: 820px) {
  .certs-scroll {
    gap: 16px;
    padding: 16px 8px 28px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .cert { flex-basis: calc((100% - 16px) / 2); }
}

@media (max-width: 560px) {
  .cert { flex-basis: 100%; }
}
