/* ==========================================================================
   IT INFRASTRUCTURE ENGINEER — PORTFOLIO
   Design language: engineering-documentation minimalism
   Fonts: Inter (display/body) + JetBrains Mono (labels/meta/data)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  /* ---- color tokens : light ---- */
  --bg:            #FAFAF9;
  --bg-raised:     #FFFFFF;
  --bg-sunken:     #F1F1EF;
  --ink:           #12151A;
  --ink-soft:      #454B54;
  --muted:         #6B7280;
  --border:        #E4E4E7;
  --border-strong: #D3D3D8;
  --accent:        #2757D6;
  --accent-ink:    #FFFFFF;
  --accent-soft:   #EAF0FE;
  --ok:            #17915E;
  --ok-soft:       #E6F6EF;
  --shadow-sm:     0 1px 2px rgba(18,21,26,0.04), 0 1px 1px rgba(18,21,26,0.03);
  --shadow-md:     0 6px 20px rgba(18,21,26,0.06), 0 2px 6px rgba(18,21,26,0.04);
  --shadow-lg:     0 20px 60px rgba(18,21,26,0.10), 0 6px 16px rgba(18,21,26,0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --max-w: 1180px;
  --nav-h: 68px;

  color-scheme: light;
}

/* html[data-theme="dark"]{
  --bg:            #0B0D10;
  --bg-raised:     #12151A;
  --bg-sunken:     #0E1013;
  --ink:           #EDEEF0;
  --ink-soft:      #C3C7CE;
  --muted:         #8A8F98;
  --border:        #23262C;
  --border-strong: #2E323A;
  --accent:        #6E93F7;
  --accent-ink:    #0B0D10;
  --accent-soft:   #16203D;
  --ok:            #3FCB92;
  --ok-soft:       #113329;
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:     0 6px 20px rgba(0,0,0,0.35);
  --shadow-lg:     0 20px 60px rgba(0,0,0,0.45);
  color-scheme: dark;
}*/

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  transition:background .35s ease, color .35s ease;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; }
svg{ display:block; }

.container{
  max-width:var(--max-w);
  margin:0 auto;
  padding:0 28px;
}

::selection{ background:var(--accent); color:var(--accent-ink); }

:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
  border-radius:4px;
}

/* ---------------------------------- */
/* Typography                          */
/* ---------------------------------- */
.eyebrow{
  font-family:var(--font-mono);
  font-size:12.5px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--accent);
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  margin:0 0 14px;
}
.eyebrow::before{
  content:"";
  width:16px;
  height:1px;
  background:var(--accent);
  display:inline-block;
}

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:700;
  letter-spacing:-0.02em;
  color:var(--ink);
  margin:0;
}
.section-title{
  font-size:clamp(10px, 3.4vw, 40px);
  line-height:1.00;
  margin-bottom:14px;
}
.section-sub{
  color:var(--muted);
  font-size:16.5px;
  max-width:640px;
  margin:0 0 48px;
}
.mono{ font-family:var(--font-mono); }

/* ---------------------------------- */
/* Nav                                 */
/* ---------------------------------- */
.nav{
  position:sticky;
  top:0;
  z-index:100;
  height:var(--nav-h);
  display:flex;
  align-items:center;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:blur(10px) saturate(140%);
  border-bottom:1px solid var(--border);
  transition:background .35s ease, border-color .35s ease;
}
.nav .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
}
.nav-left{ display:flex; align-items:center; gap:12px; }
.nav-logo{
  font-family:var(--font-mono);
  font-weight:600;
  font-size:14.5px;
  letter-spacing:0.02em;
  display:flex;
  align-items:center;
  gap:8px;
}
.status-dot{
  width:7px; height:7px; border-radius:50%;
  background:var(--ok);
  box-shadow:0 0 0 3px var(--ok-soft);
  flex:none;
  animation:pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot{
  0%,100%{ opacity:1; }
  50%{ opacity:.45; }
}
.nav-links{
  display:flex;
  align-items:center;
  gap:2px;
}
.nav-links a{
  position:relative;
  font-size:14px;
  font-weight:500;
  color:var(--ink-soft);
  padding:8px 14px;
  border-radius:8px;
  transition:color .2s ease, background .2s ease;
}
.nav-links a:hover{ color:var(--ink); background:var(--bg-sunken); }
.nav-links a.active{ color:var(--accent); }

.nav-right{ display:flex; align-items:center; gap:14px; }
.session-meta{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--muted);
  display:none;
  white-space:nowrap;
  letter-spacing:0.02em;
}
@media (min-width:900px){ .session-meta{ display:inline-flex; } }

.theme-toggle{
  width:36px; height:36px;
  border-radius:9px;
  border:1px solid var(--border);
  background:var(--bg-raised);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  color:var(--ink-soft);
  transition:border-color .2s ease, background .2s ease, transform .15s ease;
}
.theme-toggle:hover{ border-color:var(--border-strong); transform:translateY(-1px); }
.theme-toggle svg{ width:17px; height:17px; }
.icon-sun{ display:none; }
html[data-theme="dark"] .icon-moon{ display:none; }
html[data-theme="dark"] .icon-sun{ display:block; }

.nav-cta{
  font-size:14px;
  font-weight:600;
  padding:9px 16px;
  border-radius:9px;
  background:var(--ink);
  color:var(--bg);
  transition:opacity .2s ease, transform .15s ease;
  white-space:nowrap;
}
html[data-theme="dark"] .nav-cta{ background:var(--accent); color:var(--accent-ink); }
.nav-cta:hover{ opacity:.85; transform:translateY(-1px); }

.nav-burger{
  display:flex;
  width:36px; height:36px;
  border-radius:9px;
  border:1px solid var(--border);
  background:var(--bg-raised);
  align-items:center; justify-content:center;
  cursor:pointer;
}
.nav-burger svg{ width:18px; height:18px; }
@media (min-width:860px){ .nav-burger{ display:none; } }

.lang-toggle{
  height:36px;
  padding:0 14px;
  border-radius:9px;
  border:1px solid var(--border);
  background:var(--bg-raised);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  color:var(--ink-soft);
  font-size:13px;
  font-weight:600;
  letter-spacing:0.01em;
  white-space:nowrap;
  transition:border-color .2s ease, background .2s ease, transform .15s ease, color .2s ease;
}
.lang-toggle:hover{ border-color:var(--border-strong); color:var(--ink); transform:translateY(-1px); }
html[data-lang="ko"] .lang-toggle{ background:var(--ink); color:var(--bg); border-color:var(--ink); }
html[data-theme="dark"][data-lang="ko"] .lang-toggle{ background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.nav-links{ display:none; }
@media (min-width:860px){ .nav-links{ display:flex; } }

.mobile-nav{
  position:fixed; inset:var(--nav-h) 0 0 0;
  background:var(--bg);
  z-index:99;
  padding:20px 28px;
  display:none;
  flex-direction:column;
  gap:2px;
  border-top:1px solid var(--border);
}
.mobile-nav.open{ display:flex; }
.mobile-nav a{
  padding:14px 4px;
  font-size:17px;
  font-weight:600;
  border-bottom:1px solid var(--border);
  color:var(--ink);
}

/* ---------------------------------- */
/* Buttons                             */
/* ---------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:13px 22px;
  border-radius:10px;
  font-size:14.5px;
  font-weight:600;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform .15s ease, opacity .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{ transform:translateY(-1px); }
.btn-primary{ background:var(--ink); color:var(--bg); }
html[data-theme="dark"] .btn-primary{ background:var(--accent); color:var(--accent-ink); }
.btn-primary:hover{ opacity:.88; }
.btn-ghost{ background:transparent; border-color:var(--border-strong); color:var(--ink); }
.btn-ghost:hover{ background:var(--bg-sunken); }
.btn svg{ width:16px; height:16px; }

/* ---------------------------------- */
/* Sections / general                  */
/* ---------------------------------- */
section{ padding:112px 0; border-bottom:1px solid var(--border); }
section:last-of-type{ border-bottom:none; }

.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.in{ opacity:1; transform:translateY(0); }

/* ---------------------------------- */
/* Hero                                */
/* ---------------------------------- */
.hero{
  padding:76px 0 96px;
  border-bottom:1px solid var(--border);
  overflow:hidden;
}
.hero .container{
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:56px;
  align-items:center;
}
@media (max-width:940px){
  .hero .container{ grid-template-columns:1fr; }
}
.hero-kicker{
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--muted);
  letter-spacing:0.06em;
  margin-bottom:20px;
  display:block;
}
.hero-name{
  font-size:clamp(38px, 5.4vw, 60px);
  line-height:1.05;
}
.hero-role{
  font-size:clamp(18px, 2vw, 22px);
  color:var(--accent);
  font-weight:600;
  margin-top:14px;
  font-family:var(--font-mono);
  letter-spacing:-0.01em;
}
.hero-desc{
  margin-top:22px;
  font-size:17px;
  color:var(--ink-soft);
  max-width:520px;
  line-height:1.75;
}
.hero-actions{
  display:flex; gap:12px; margin-top:34px; flex-wrap:wrap;
}
.hero-stats{
  display:grid;
  grid-template-columns:repeat(3,auto);
  gap:30px;
  margin-top:52px;
}
@media (max-width:529x){ .hero-stats{ grid-template-columns:repeat(2,auto); } }
.hero-stat b{
  font-family:var(--font-mono);
  font-size:19px;
  font-weight:550;
  color:var(--ink);
  display:block;
}
.hero-stat span{
  font-size:15spx;
  color:var(--muted);
  letter-spacing:0.02em;
}

/* signature network trace visual */
.trace-wrap{
  display:flex;
   justify-content:center;
   align-items:flex-end;

   width:100%;
   height:100%;
}
.trace-card{
  width:100%;
   display:flex;
   justify-content:center;
   align-items:flex-end;

   background:transparent;
   border:none;
   box-shadow:none;
   overflow:visible;
.trace-card svg{ width:76%; max-width:340px; height:auto; }
}

.trace-node-label{
  font-family:var(--font-mono);
  fill:var(--muted);
  font-size:10px;
  letter-spacing:0.03em;
}
.trace-line{
  fill:none;
  stroke:var(--border-strong);
  stroke-width:1.5;
}
.trace-pulse{
  fill:none;
  stroke:var(--accent);
  stroke-width:2;
  stroke-linecap:round;
  stroke-dasharray:6 220;
  animation:trace-flow 3.6s linear infinite;
}
@keyframes trace-flow{
  0%{ stroke-dashoffset:0; }
  100%{ stroke-dashoffset:-450; }
}
.trace-node-box{ fill:var(--bg-raised); stroke:var(--border-strong); stroke-width:1.2; }
.trace-node-dot{ fill:var(--ok); }

/* ---------------------------------- */
/* About                               */
/* ---------------------------------- */
.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:64px;
  align-items:start;
}
@media (max-width:860px){ .about-grid{ grid-template-columns:1fr; gap:36px; } }
.about-text p{ color:var(--ink-soft); font-size:16.5px; margin:0 0 16px; }
.about-text p:last-child{ margin-bottom:0; }
.tag-cloud{ display:flex; flex-wrap:wrap; gap:10px; }
.tag{
  font-family:var(--font-mono);
  font-size:12.8px;
  padding:8px 14px;
  border:1px solid var(--border);
  border-radius:100px;
  color:var(--ink-soft);
  background:var(--bg-raised);
  transition:border-color .2s ease, color .2s ease, transform .15s ease;
}
.tag:hover{ border-color:var(--accent); color:var(--accent); transform:translateY(-1px); }

/* ---------------------------------- */
/* Skills                              */
/* ---------------------------------- */
.skills-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:20px;
}
@media (max-width:900px){ .skills-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .skills-grid{ grid-template-columns:1fr; } }
.skill-card{
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:var(--bg-raised);
  padding:26px 24px;
  transition:box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.skill-card:hover{ box-shadow:var(--shadow-md); border-color:var(--border-strong); transform:translateY(-3px); }
.skill-icon{
  width:38px; height:38px;
  border-radius:9px;
  background:var(--accent-soft);
  color:var(--accent);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:16px;
}
.skill-icon svg{ width:19px; height:19px; }
.skill-card h4{ font-size:16.5px; margin-bottom:10px; }
.skill-list{ display:flex; flex-wrap:wrap; gap:6px; }
.skill-list li{
  font-size:12.3px;
  color:var(--muted);
  background:var(--bg-sunken);
  padding:5px 10px;
  border-radius:6px;
  font-family:var(--font-mono);
}

/* ---------------------------------- */
/* Career timeline                     */
/* ---------------------------------- */
.timeline{ position:relative; padding-left:32px; }
.timeline::before{
  content:"";
  position:absolute; left:5px; top:6px; bottom:6px;
  width:1px;
  background:var(--border);
}
.tl-item{ position:relative; padding-bottom:52px; }
.tl-item:last-child{ padding-bottom:0; }
.tl-dot{
  position:absolute; left:-32px; top:4px;
  width:11px; height:11px; border-radius:50%;
  background:var(--bg); border:2px solid var(--accent);
}
.tl-head{
  display:flex; flex-wrap:wrap; align-items:baseline; gap:10px 16px;
  margin-bottom:6px;
}
.tl-role{ font-size:20px; font-weight:700; }
.tl-period{
  font-family:var(--font-mono);
  font-size:12.5px;
  color:var(--muted);
  background:var(--bg-sunken);
  padding:4px 10px;
  border-radius:6px;
}
.tl-company{ color:var(--accent); font-weight:600; font-size:14.5px; margin-bottom:14px; }
.tl-cols{ display:grid; grid-template-columns:1fr 1fr; gap:28px; margin-top:14px; }
@media (max-width:700px){ .tl-cols{ grid-template-columns:1fr; } }
.tl-cols h5{
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--muted);
  margin:0 0 10px;
}
.tl-cols ul li{
  font-size:14.8px;
  color:var(--ink-soft);
  padding-left:16px;
  position:relative;
  margin-bottom:8px;
  line-height:1.55;
}
.tl-cols ul li::before{
  content:"";
  position:absolute; left:0; top:9px;
  width:5px; height:1.5px;
  background:var(--border-strong);
}

/* ---------------------------------- */
/* Projects                            */
/* ---------------------------------- */
.filter-bar{
  display:flex; flex-wrap:wrap; gap:8px; margin-bottom:40px;
}
.filter-btn{
  font-family:var(--font-mono);
  font-size:12.5px;
  padding:8px 15px;
  border-radius:100px;
  border:1px solid var(--border);
  background:var(--bg-raised);
  color:var(--ink-soft);
  cursor:pointer;
  transition:all .2s ease;
}
.hero-photo{
   width:140%;
   max-width:3000px;
   height:auto;
   
   transform:translateY(-60px);
   
   filter:drop-shadow(0 20px 35px rgba(0,0,0,.18));
}
.filter-btn:hover{ border-color:var(--border-strong); }
.filter-btn.active{ background:var(--ink); color:var(--bg); border-color:var(--ink); }
html[data-theme="dark"] .filter-btn.active{ background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }

.project-list{ display:flex; flex-direction:column; gap:20px; }
.project-card{
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:var(--bg-raised);
  overflow:hidden;
  transition:box-shadow .25s ease, border-color .25s ease;
}
.project-card:hover{ box-shadow:var(--shadow-md); }
.project-card.hidden{ display:none; }

.project-head{
  padding:28px 30px;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  cursor:pointer;
  flex-wrap:wrap;
}
.project-head-left{ display:flex; align-items:flex-start; gap:16px; }
.project-index{
  font-family:var(--font-mono);
  font-size:13px; color:var(--muted);
  padding-top:3px;
}
.project-title{ font-size:19px; margin-bottom:6px; }
.project-tagline{ color:var(--muted); font-size:14px; max-width:560px; }
.project-meta-chips{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.chip{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--muted);
  background:var(--bg-sunken);
  padding:4px 9px;
  border-radius:6px;
}
.project-toggle{
  width:34px; height:34px; border-radius:8px;
  border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  flex:none;
  transition:transform .3s ease, background .2s ease;
  color:var(--ink-soft);
}
.project-toggle svg{ width:15px; height:15px; }
.project-card.open .project-toggle{ transform:rotate(45deg); background:var(--bg-sunken); }

.project-body{
  max-height:0;
  overflow:hidden;
  transition:max-height .45s cubic-bezier(.22,.61,.36,1);
}
.project-card.open .project-body{ max-height:none; }
.project-body-inner{
  padding:0 30px 34px;
  border-top:1px solid var(--border);
  margin-top:0;
  padding-top:26px;
}
.case-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:24px 32px;
}
@media (max-width:760px){ .case-grid{ grid-template-columns:1fr; } }
.case-block h5{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:0.09em;
  text-transform:uppercase;
  color:var(--accent);
  margin:0 0 10px;
}
.case-block p, .case-block li{
  font-size:14.5px;
  color:var(--ink-soft);
  line-height:1.65;
  margin:0 0 6px;
}
.case-block.full{ grid-column:1 / -1; }
.result-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.result-tag{
  font-size:12.8px;
  font-family:var(--font-mono);
  background:var(--ok-soft);
  color:var(--ok);
  padding:6px 11px;
  border-radius:7px;
}
.tech-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.tech-tag{
  font-size:12.5px;
  font-family:var(--font-mono);
  background:var(--accent-soft);
  color:var(--accent);
  padding:6px 11px;
  border-radius:7px;
}

/* ---------------------------------- */
/* Research Papers                     */
/* ---------------------------------- */
#research{ padding-top: 0; }

.research-divider{
  display:flex; align-items:center; gap:18px;
  margin-bottom:48px;
}
.research-divider-line{
  flex:1; height:1px; background:var(--border);
}
.research-divider-label{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:0.12em;
  color:var(--muted);
  white-space:nowrap;
}

.research-header{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:20px; margin-bottom:40px; flex-wrap:wrap;
}
.research-badge{
  font-family:var(--font-mono);
  font-size:11.5px;
  padding:8px 16px;
  border-radius:100px;
  border:1.5px solid var(--accent);
  color:var(--accent);
  background:var(--accent-soft);
  white-space:nowrap;
  align-self:flex-start;
  margin-top:8px;
}

.paper-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:20px;
}
@media (max-width:960px){ .paper-grid{ grid-template-columns:1fr; } }
@media (min-width:961px) and (max-width:1180px){ .paper-grid{ grid-template-columns:repeat(2,1fr); } }

.paper-card{
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:var(--bg-raised);
  transition:box-shadow .25s ease, border-color .25s ease, transform .25s ease;
  display:flex; flex-direction:column;
}
.paper-card:hover{
  box-shadow:var(--shadow-md);
  border-color:var(--border-strong);
  transform:translateY(-2px);
}

.paper-card-inner{
  padding:26px 26px 22px;
  display:flex; flex-direction:column; height:100%;
}

.paper-top{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px;
}
.paper-num{
  font-family:var(--font-mono);
  font-size:12px; color:var(--muted);
}
.paper-field{
  font-family:var(--font-mono);
  font-size:10.5px;
  color:var(--accent);
  background:var(--accent-soft);
  padding:4px 10px;
  border-radius:6px;
  letter-spacing:0.03em;
}

.paper-title{
  font-size:16px;
  font-weight:700;
  line-height:1.4;
  margin:0 0 12px;
  color:var(--ink);
}

.paper-abstract{
  font-size:13.5px;
  color:var(--ink-soft);
  line-height:1.65;
  margin:0 0 18px;
  flex:1;
}

.paper-meta{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
  margin-bottom:16px;
}
.paper-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.paper-tag{
  font-family:var(--font-mono);
  font-size:10.5px;
  background:var(--bg-sunken);
  color:var(--muted);
  padding:4px 9px;
  border-radius:6px;
}
.paper-year{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--muted);
  white-space:nowrap;
}

.paper-expand-area{ margin-top:auto; border-top:1px solid var(--border); padding-top:16px; }

.paper-toggle{
  display:flex; align-items:center; gap:7px;
  background:none; border:none; padding:0;
  cursor:pointer;
  font-family:var(--font-body);
  font-size:13px;
  font-weight:600;
  color:var(--accent);
  transition:color .2s ease;
  width:100%;
}
.paper-toggle:hover{ color:var(--ink); }
.paper-toggle svg{
  width:16px; height:16px;
  transition:transform .3s cubic-bezier(.22,.61,.36,1);
  margin-left:auto;
}
.paper-card.paper-open .paper-toggle svg{ transform:rotate(180deg); }

.paper-detail{
  max-height:0;
  overflow:hidden;
  transition:max-height .45s cubic-bezier(.22,.61,.36,1);
}
.paper-card.paper-open .paper-detail{ max-height:600px; }

.paper-detail-inner{ padding-top:20px; }
.paper-detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px 24px;
}
@media (max-width:540px){ .paper-detail-grid{ grid-template-columns:1fr; } }

.paper-detail-block h5{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:0.09em;
  text-transform:uppercase;
  color:var(--accent);
  margin:0 0 8px;
}
.paper-detail-block p{
  font-size:13px;
  color:var(--ink-soft);
  line-height:1.65;
  margin:0;
}

/* ---------------------------------- */
/* Architecture diagrams               */
/* ---------------------------------- */
.arch-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
}
@media (max-width:900px){ .arch-grid{ grid-template-columns:1fr; } }
.arch-card{
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:var(--bg-raised);
  padding:24px;
}
.arch-card h4{ font-size:15.5px; margin-bottom:4px; }
.arch-card p{ color:var(--muted); font-size:13.3px; margin:0 0 16px; }
.arch-svg-wrap{
  border:1px dashed var(--border);
  border-radius:var(--radius-sm);
  background:var(--bg-sunken);
  padding:14px;
  overflow-x:auto;
}
.diagram-text{ font-family:var(--font-mono); font-size:10.5px; fill:var(--ink-soft); }
.diagram-label{ font-family:var(--font-mono); font-size:9px; fill:var(--muted); }
.diagram-box{ fill:var(--bg-raised); stroke:var(--border-strong); stroke-width:1.3; }
.diagram-box-accent{ fill:var(--accent-soft); stroke:var(--accent); stroke-width:1.3; }
.diagram-line{ stroke:var(--border-strong); stroke-width:1.4; fill:none; }
.diagram-arrow{ fill:var(--border-strong); }
.diagram-dot{ fill:var(--ok); }

/* ---------------------------------- */
/* Hobby photo carousel                */
/* ---------------------------------- */
.hobby-carousel{ margin-top:56px; }
.hobby-carousel-title{
  font-size:15px;
  font-weight:600;
  letter-spacing:.02em;
  margin:0 0 16px;
  color:var(--ink);
}
.hobby-carousel-viewport{
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:14px;
}
.hobby-carousel-track{
  display:flex;
  gap:13px;
  width:max-content;
  /* N = number of unique photos (8 here). Duration = N * 2s so each photo
     advances roughly every 2 seconds. If you add/remove photos, update
     both the number of .hobby-slide elements in the HTML (original AND
     duplicated set) and the two numbers below. */
  animation:hobbyScroll 24s linear infinite;
}
.hobby-carousel-viewport:hover .hobby-carousel-track{
  animation-play-state:paused; /* pause on hover so visitors can look closer */
}
.hobby-slide{
  flex:0 0 auto;
  width:150px;
  height:150px;
  border-radius:var(--radius-sm);
  overflow:hidden;
  border:1px solid var(--border);
}
.hobby-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
@keyframes hobbyScroll{
  from{ transform:translateX(0); }
  /* -1 * (slide width 150px + gap 14px) * 8 photos = -1312px */
  to{ transform:translateX(-50%); }
}
@media (max-width:900px){
  .hobby-slide{ width:120px; height:120px; }
  .hobby-carousel-track{ animation-name:hobbyScrollMobile; }
}
@keyframes hobbyScrollMobile{
  from{ transform:translateX(0); }
  to{ transform:translateX(-1072px); } /* -(120+14)*8 */
}

/* ---------------------------------- */
/* Gallery                             */
/* ---------------------------------- */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:16px;
}
@media (max-width:900px){ .gallery-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .gallery-grid{ grid-template-columns:1fr 1fr; } }
.gallery-item{
  aspect-ratio:4/3;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:var(--bg-sunken);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px;
  color:var(--muted);
  transition:border-color .2s ease, transform .2s ease;
  position:relative;
  overflow:hidden;
}
.gallery-item:hover{ border-color:var(--border-strong); transform:translateY(-2px); }
.gallery-item svg{ width:26px; height:26px; opacity:.55; }
.gallery-item span{
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:0.03em;
}
.gallery-item::after{
  content:"REPLACE IMAGE";
  position:absolute; bottom:8px; right:10px;
  font-family:var(--font-mono);
  font-size:8.5px;
  color:var(--border-strong);
  letter-spacing:0.05em;
}

/* ---------------------------------- */
/* Contact                             */
/* ---------------------------------- */
.contact-wrap{
  display:grid;
  grid-template-columns:1.1fr 0.9fr;
  gap:48px;
  align-items:center;
}
@media (max-width:860px){ .contact-wrap{ grid-template-columns:1fr; } }
.contact-links{ display:grid; gap:12px; }
.contact-link{
  display:flex; align-items:center; justify-content:space-between;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:18px 22px;
  background:var(--bg-raised);
  transition:border-color .2s ease, transform .2s ease;
}
.contact-link:hover{ border-color:var(--accent); transform:translateX(3px); }
.contact-link-left{ display:flex; align-items:center; gap:14px; }
.contact-link-icon{
  width:36px; height:36px; border-radius:9px;
  background:var(--bg-sunken);
  display:flex; align-items:center; justify-content:center;
  color:var(--ink-soft);
}
.contact-link-icon svg{ width:17px; height:17px; }
.contact-link b{ display:block; font-size:14.8px; }
.contact-link span{ font-size:12.8px; color:var(--muted); font-family:var(--font-mono); }
.contact-link svg.arrow{ width:15px; height:15px; color:var(--muted); }

/* ---------------------------------- */
/* Footer                              */
/* ---------------------------------- */
.footer{
  padding:32px 0;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
}
.footer p{ font-size:13px; color:var(--muted); margin:0; }
.footer .mono{ font-size:12px; color:var(--muted); }

/* ---------------------------------- */
/* Back to top                         */
/* ---------------------------------- */
.back-to-top{
  position:fixed;
  right:24px; bottom:24px;
  width:44px; height:44px;
  border-radius:50%;
  background:var(--ink);
  color:var(--bg);
  display:flex; align-items:center; justify-content:center;
  border:none;
  cursor:pointer;
  box-shadow:var(--shadow-md);
  opacity:0; visibility:hidden; transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index:90;
}
html[data-theme="dark"] .back-to-top{ background:var(--accent); color:var(--accent-ink); }
.back-to-top.show{ opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top svg{ width:18px; height:18px; }

/* ---------------------------------- */
/* Section label icon helper           */
/* ---------------------------------- */
.eyebrow-row{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
  margin-bottom:6px;
}
