/* Shared responsive refinements, loaded after the original styles. */
html { scroll-behavior:smooth; scroll-padding-top:90px; }
body { min-width:0; overflow-wrap:break-word; }
img, video { max-width:100%; }
:focus-visible { outline:2px solid #00ffff; outline-offset:4px; }
header { position:sticky; top:0; flex-direction:row; gap:18px; padding:14px clamp(16px,3vw,48px); align-items:center; }
header h1 { flex-shrink:0; font-size:clamp(1.05rem,2vw,1.55rem); margin:0; }
header nav { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px clamp(8px,1.2vw,22px); }
header nav a { margin:0; font-size:clamp(.76rem,1vw,.94rem); padding:9px 0; }
.nav-toggle { display:none; border:1px solid #00aaff; border-radius:8px; padding:10px 12px; color:#dce7ef; background:#192038; font:inherit; cursor:pointer; }
.nav-toggle span { margin-right:4px; }
section { padding:clamp(44px,7vw,100px) clamp(18px,4vw,50px); }
section h2 { font-size:clamp(1.55rem,3.4vw,2.4rem); margin-bottom:clamp(22px,4vw,40px); overflow-wrap:anywhere; }
.project-page main { padding-top:0; }
.project-page .container { max-width:1120px; }
.grid, .skills-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:clamp(14px,2.4vw,30px); }
.grid > a, .grid > *, .skills-grid > *, .study-steps > *, .download-grid > *, .gallery > * { min-width:0; }
.grid > a > .card { height:100%; }
.card h3, .skill-card h3, .study-card h3 { overflow-wrap:anywhere; }
.timeline-content ul { padding-left:1.2em; }
.timeline-content { overflow-wrap:anywhere; }
.timeline-item::before { left:-54px; }
.project-page pre { max-width:100%; overflow-x:auto; }
.project-page .download-btn, .project-page .back-btn, .project-page .btn { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.portfolio-home .hero { height:auto; min-height:calc(88vh - 65px); padding:clamp(60px,10vw,140px) 20px; }
.portfolio-home .hero h2 { white-space:normal; overflow:visible; border-right:0; border-bottom:0; line-height:1.2; font-size:clamp(1.7rem,5vw,3rem); max-width:100%; }
.hero-intro, #typed-name { display:block; font-family:inherit; }
#typed-name { min-height:1.2em; }
.portfolio-home .hero p { opacity:1; transform:none; max-width:720px; font-size:clamp(1rem,2vw,1.2rem); }
.portfolio-home .hero .hero-status { display:inline-block; font-size:.9rem; color:#76f6d2; background:#142c35; border:1px solid #2b8278; border-radius:30px; padding:8px 14px; margin:4px 0 18px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:28px; }
.action-btn { display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding:12px 20px; border:1px solid #00aaff; border-radius:9px; color:#c7f4ff; font-weight:500; text-align:center; }
.action-btn.primary { background:#00aaff; color:#0f172a; }
.action-btn:hover { background:#00ffff; color:#0f172a; }
.about { align-items:center; gap:clamp(20px,4vw,40px); }
.about-copy { flex:1; min-width:0; }
.about-copy p { margin:0 0 16px; }
.stage-note { background:#192038; border-left:3px solid #00ffff; border-radius:8px; padding:14px 18px; }
.stage-highlight { color:#76f6d2 !important; }
.current-experience .timeline-content { border:1px solid #00aaff; }
.study-wrapper { margin:0 auto; max-width:1200px; }
.study-progress { margin-bottom:16px; gap:12px; }
.progress-fill { width:50%; }
.study-caption { color:#cfd8dc; line-height:1.6; margin-bottom:24px; }
.study-steps { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:20px; }
.study-card { padding:20px; cursor:default; border:1px solid #30435f; }
.study-card.current-study { border:2px solid #00ffff; box-shadow:0 0 24px rgba(0,255,255,.15); }
.study-card summary { list-style:none; cursor:pointer; position:relative; padding-right:30px; }
.study-card summary::-webkit-details-marker { display:none; }
.study-card summary::after { content:'+'; color:#00ffff; font-size:1.6rem; position:absolute; top:0; right:0; }
.study-card[open] summary::after { content:'−'; }
.study-status { display:block; font-size:.82rem; color:#aabed2; margin-bottom:10px; }
.current-study .study-status, .past-study .study-status { color:#76f6d2; }
.study-card .short { display:block; font-size:.9rem; margin-bottom:0; }
.study-card .details { max-height:none; opacity:1; transition:none; }
.study-card:not([open]) .details { display:none; }
.study-card .cert-list { padding-left:0; }
.cert-list li { opacity:1; transform:none; animation:none; line-height:1.5; }
.cert-list li.todo::before { content:'○'; color:#8fa4bf; }
.cert-list a { text-decoration:underline; text-underline-offset:3px; }
.cert-caption { margin-top:18px; color:#b8cce1; font-size:.88rem; }
.contact-intro { color:#cfd8dc; text-align:center; line-height:1.6; margin-bottom:24px; }
.contact form { gap:8px; }
.contact label { font-size:.92rem; color:#cfd8dc; }
.contact input,.contact textarea { width:100%; min-width:0; font-size:16px; margin-bottom:10px; }
.contact button { min-height:46px; }
#back-to-top { display:none; bottom:max(18px,env(safe-area-inset-bottom)); right:18px; }
.legal-page .container { overflow-wrap:anywhere; opacity:1; }
/* Content is available even if animations are unsupported. */
.fade-in,.timeline-item { opacity:1; transform:none; }
@media (max-width:1200px) {
  header { flex-wrap:wrap; justify-content:space-between; gap:0 12px; }
  .nav-ready .nav-toggle { display:inline-flex; align-items:center; min-height:44px; }
  header nav { width:100%; flex-direction:column; align-items:stretch; gap:0; padding-top:8px; }
  .nav-ready header nav:not(.is-open) { display:none; }
  header nav a { padding:12px 8px; font-size:.95rem; border-top:1px solid #26354e; }
  header nav.is-open { max-height:calc(100dvh - 80px); overflow-y:auto; }
  header nav a::after { display:none; }
}
@media (max-width:768px) {
  section { padding:52px 18px; }
  .about { flex-direction:column; text-align:left; }
  .about img { width:170px; height:170px; }
  .about-copy p { font-size:1rem; }
  .timeline { padding-left:22px; margin:25px 0; }
  .timeline-item::before { left:-33px; width:17px; height:17px; }
  .timeline-content { padding:17px; }
  .timeline-item { margin-bottom:24px; }
  .study-steps,.download-grid { grid-template-columns:minmax(0,1fr); }
  .study-progress { flex-wrap:wrap; }
  #progressText { font-size:.85rem; }
  .project-page .container { padding:0 16px; }
  .project-page .gallery { grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); }
  .project-page .hero-card { padding:18px; }
  .project-page .section { padding:40px 0 12px; }
  .project-page .hero { padding:30px 0 15px; }
  .project-page .section-title h2, .project-page .hero h2 { font-size:clamp(1.35rem,5vw,1.75rem); overflow-wrap:anywhere; }
  .legal-page { padding:18px 12px; }
  .legal-page .container { padding:22px 18px; }
  .legal-page h1 { font-size:1.65rem; }
}
@media (max-width:440px) {
  .hero-actions { width:100%; flex-direction:column; }
  .hero-actions .action-btn { width:100%; }
  .portfolio-home .hero { min-height:calc(80svh - 65px); }
  .card,.skill-card,.study-card { padding:18px; }
  .grid,.skills-grid { grid-template-columns:minmax(0,1fr); }
  .contact { margin:0; }
}
@media (hover:none) { .card:hover,.skill-card:hover,.timeline-item:hover .timeline-content,footer:hover,.download-btn:hover { transform:none; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; } #network-bg { display:none; } }
