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

/* =====================================================================
   PREMIUM — warm ivory, champagne, deep bordeaux + navy ink
   Light mode only. Serif display (Cormorant Garamond) + sans body (DM Sans).
   ===================================================================== */
:root {
  /* surfaces */
  --cream: #fbf8f2;
  --off-white: #fffdf9;
  --parchment: #f6f0e4;
  --champagne: #eadfc6;
  --champagne-soft: #f3ebd9;
  --gold: #b99a5b;
  --gold-ink: #7d6228;

  /* ink */
  --ink: #1e1a17;
  --ink-muted: #5e564d;
  --ink-faint: #766d62;

  /* deep accent (bordeaux) + navy */
  --accent: #6b2437;
  --accent-dark: #511a2a;
  --accent-light: #e4c4cc;
  --accent-verylight: #f6e9ec;
  --section-head: #1f2a4d;
  --section-timeframe: #3a4a7a;
  --section-tileHeader: #2b3a63;

  /* lines */
  --rule: #e9e0cf;
  --rule-strong: #d8cbb0;

  /* three-tier warm elevation */
  --shadow-soft: 0 1px 2px rgba(90,65,25,.05), 0 2px 10px rgba(90,65,25,.05);
  --shadow-card: 0 2px 4px rgba(90,65,25,.05), 0 10px 28px rgba(90,65,25,.09);
  --shadow-hover: 0 4px 8px rgba(90,65,25,.06), 0 18px 44px rgba(90,65,25,.14);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --ease: cubic-bezier(.22,1,.36,1);
  --nav-h: 56px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --pad-x: clamp(1.1rem, 4.5vw, 2rem);
}

html { scroll-behavior: smooth; font-variant-numeric: lining-nums; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { overflow-x: clip; }
.container { max-width: 840px; margin: 0 auto; padding: 0 var(--pad-x); }

/* icons (inline SVG sprite) */
.ico {
  width: 14px; height: 14px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ====== NAV ====== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(251,248,242,0.97);
  border-bottom: 1px solid var(--rule);
  height: var(--nav-h);
  box-shadow: var(--shadow-soft);
}
.nav-inner {
  max-width: 840px; margin: 0 auto; padding: 0 var(--pad-x);
  height: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  transition: color 0.25s var(--ease);
  display: inline-flex; align-items: center; min-height: 44px;
}
.nav-brand:hover { color: var(--accent); }
.nav-links { display: flex; gap: 0.1rem; list-style: none; flex-wrap: nowrap; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  min-height: 44px;
  border-radius: 100px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  display: flex; align-items: center;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--champagne-soft); }
.nav-links a.active { color: var(--accent); background: var(--accent-verylight); font-weight: 400; }

/* ====== HERO ====== */
#hero {
  padding-top: calc(var(--nav-h) + 3.6rem);
  padding-bottom: 3.6rem;
  position: relative;
}
#hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -150px;
  width: 540px; height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(234,223,198,0.85) 0%, rgba(234,223,198,0) 68%);
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M0 5 Q30 0 60 5 T120 5' fill='none' stroke='%23d8cbb0' stroke-width='1'/%3E%3C/svg%3E") repeat-x center;
  opacity: .9;
}

.hero-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 3.2rem; position: relative; }
.hero-text { flex: 1; min-width: 0; }

.hero-photo { flex-shrink: 0; width: 168px; position: relative; isolation: isolate; margin-right: 10px; }
.hero-photo::before {
  content: '';
  position: absolute; inset: 0;
  transform: translate(11px, 11px);
  border: 1px solid var(--gold);
  border-radius: 84px 84px 22px 22px;
  z-index: -1;
}
.hero-photo img {
  width: 168px; height: 216px;
  object-fit: cover;
  border-radius: 84px 84px 22px 22px;
  display: block;
  border: 4px solid var(--off-white);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.hero-photo img:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-label::before {
  content: '';
  display: inline-block;
  width: 26px; height: 1px;
  background: var(--gold);
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.9rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}
.hero-name em { font-style: italic; font-weight: 400; color: var(--accent); }

.hero-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 500;
  font-style: italic;
  color: var(--section-tileHeader);
  margin-bottom: 1.4rem;
  line-height: 1.3;
}

.hero-tagline {
  font-size: 1.00rem;
  color: var(--ink-muted);
  max-width: 480px;
  line-height: 1.8;
}

.hero-meta {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  padding: 0.5rem 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: 100px;
  box-shadow: var(--shadow-soft);
}
.hero-badge .ico { color: var(--gold-ink); }
.hero-badge span { color: var(--ink); }

.hero-cta { margin-top: 1.9rem; display: flex; gap: 0.7rem; flex-wrap: wrap; }
.btn {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.3rem;
  min-height: 44px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-primary {
  background: var(--accent);
  color: var(--off-white);
  box-shadow: 0 2px 4px rgba(107,36,55,.18), 0 8px 20px rgba(107,36,55,.18);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(107,36,55,.2), 0 12px 28px rgba(107,36,55,.24); }
.btn-outline {
  border: 1px solid var(--rule-strong);
  color: var(--ink-muted);
  background: var(--off-white);
  box-shadow: var(--shadow-soft);
}
.btn-outline:hover { border-color: var(--gold); color: var(--ink); background: var(--champagne-soft); transform: translateY(-1px); }

/* ====== TAB PANELS ====== */
.tab-panel { display: none; padding: 3.2rem 0 3.6rem; animation: fadeUp 0.5s var(--ease) both; }
.tab-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ====== SECTION HEADER ====== */
.section-header { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 2.2rem; }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--section-head);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.section-rule { flex: 1; min-width: 24px; height: 1px; background: linear-gradient(to right, var(--rule-strong), transparent); }

/* ====== ABOUT ====== */
.about-body p {
  font-size: 0.975rem;
  color: var(--ink-muted);
  max-width: 680px;
  margin-bottom: 1.15rem;
  line-height: 1.85;
}
.about-body p:last-child { margin-bottom: 0; }
.hl { color: var(--ink); font-weight: 400; }

/* ====== SKILLS ====== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.1rem;
  margin-top: 1.8rem;
}
.skill-group {
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.3rem 1.05rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.skill-group:hover { box-shadow: var(--shadow-card); border-color: var(--rule-strong); transform: translateY(-2px); }
.skill-group h3 {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
}
.skill-group ul { list-style: none; }
.skill-group li {
  font-size: 0.83rem;
  color: var(--ink-muted);
  padding: 0.24rem 0;
}
.skills-divider { margin-top: 2.9rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }

/* ====== TIMELINE ====== */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.6rem;
  padding: 2.1rem 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 128px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--rule-strong) 10%, var(--rule-strong) 90%, transparent);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 124px; top: 2.6rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--gold);
}
.timeline-item:first-child::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-verylight); }
.t-period {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--section-timeframe);
  padding-top: 0.25rem;
  line-height: 1.7;
  font-style: italic;
  text-align: right;
  padding-right: 1.5rem;
}
.t-body h3 {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 500;
  font-style: italic;
  color: var(--section-tileHeader);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}
.t-company {
  font-family: var(--font-mono);
  font-size: 0.80rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.t-loc {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.t-loc .ico { width: 12px; height: 12px; color: var(--gold-ink); }
.t-body p { font-size: 0.975rem; color: var(--ink-muted); line-height: 1.75; margin-bottom: 0.5rem; }
.t-body ul { list-style: none; margin-top: 0.4rem; display: flex; flex-direction: column; gap: 0.3rem; }
.t-body ul li {
  font-size: 0.83rem;
  color: var(--ink-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.65;
}
.t-body ul li::before { content: ''; position: absolute; left: 0.1rem; top: 0.68em; width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }
.t-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  background: var(--champagne-soft);
  color: var(--gold-ink);
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  text-transform: uppercase;
  margin-top: 0.7rem;
  margin-right: 0.3rem;
  border: 1px solid var(--champagne);
}
.t-badge .ico { width: 12px; height: 12px; }

/* ====== PROJECTS (legacy card) ====== */
.projects-grid { display: flex; flex-direction: column; gap: 0.8rem; }
.project-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1.3rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  text-decoration: none; color: inherit;
  background: var(--off-white);
  box-shadow: var(--shadow-soft);
}
.project-card:hover { border-color: var(--gold); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.project-info h3 { font-family: var(--font-serif); font-size: 1.00rem; font-weight: 500; color: var(--section-tileHeader); margin-bottom: 0.3rem; }
.project-info p { font-size: 0.83rem; color: var(--ink-muted); line-height: 1.65; }
.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.6rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  background: var(--parchment);
  border: 1px solid var(--rule);
  color: var(--section-tileHeader);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
}
.p-arrow { font-size: 0.9rem; color: var(--ink-faint); padding-top: 0.1rem; flex-shrink: 0; transition: color 0.2s; }
.project-card:hover .p-arrow { color: var(--accent); }

/* ====== PROJECTS REDESIGN ====== */
.projects-section { margin-bottom: 3.2rem; }
.projects-section:last-child { margin-bottom: 0; }

.proj-section-header { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.6rem; }
.proj-section-label {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1.5;
}
.proj-section-label::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 6px; height: 6px;
  transform: rotate(45deg);
}
.proj-section-rule { flex: 1; min-width: 24px; height: 1px; }

/* Client engagements — champagne bronze */
.proj-section-label.client { color: var(--gold-ink); }
.proj-section-label.client::before { background: var(--gold); }
.proj-section-rule.client { background: linear-gradient(to right, var(--gold), transparent); opacity: 0.55; }

/* Organisational — navy slate */
.proj-section-label.org { color: var(--section-timeframe); }
.proj-section-label.org::before { background: var(--section-timeframe); }
.proj-section-rule.org { background: linear-gradient(to right, var(--section-timeframe), transparent); opacity: 0.3; }

.proj-card {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.9rem 1.6rem;
  background: var(--off-white);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  margin-bottom: 0.9rem;
  overflow: hidden;
}
.proj-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  opacity: .85;
}
.proj-card.client::before { background: linear-gradient(to right, var(--gold), rgba(185,154,91,0)); }
.proj-card.org::before { background: linear-gradient(to right, var(--section-timeframe), rgba(58,74,122,0)); }
.proj-card:last-child { margin-bottom: 0; }
.proj-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.proj-card.client:hover { border-color: var(--gold); }
.proj-card.org:hover { border-color: var(--section-timeframe); }

.proj-card-title {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.proj-card.client .proj-card-title { color: var(--gold-ink); }
.proj-card.org .proj-card-title { color: var(--section-timeframe); }

.proj-card-body {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.8;
  margin-bottom: 0.85rem;
  max-width: 820px;
}
.proj-card.client .tag { color: var(--gold-ink); background: var(--champagne-soft); border-color: var(--champagne); }
.proj-card.org .tag { color: var(--section-timeframe); border-color: #d3d8ec; background: #f1f3fa; }

/* ====== HONORS ====== */
.honors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.05rem; }
.honor-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem 1.2rem;
  background: var(--off-white);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.honor-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.honor-card:hover { box-shadow: var(--shadow-hover); border-color: var(--champagne); transform: translateY(-3px); }
.honor-card:hover::before { opacity: 1; }
.honor-title {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.honor-meta {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}
.honor-desc { font-size: 0.80rem; color: var(--ink-muted); line-height: 1.65; }

/* ====== PUBLICATION ====== */
.pub-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  background: var(--off-white);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}
.pub-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}
.pub-meta { font-family: var(--font-mono); font-size: 0.64rem; color: var(--accent); letter-spacing: 0.05em; margin-bottom: 0.7rem; line-height: 1.6; }
.pub-abstract { font-size: 0.83rem; color: var(--ink-muted); line-height: 1.75; margin-bottom: 0.95rem; }
.pub-link {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--section-tileHeader);
  text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
  position: relative;
  transition: color 0.25s;
}
.pub-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 12px; height: 1px; background: var(--gold); transition: background 0.25s; }
.pub-link:hover { color: var(--accent); }
.pub-link:hover::after { background: var(--accent); }

/* ====== RECOMMENDATIONS ====== */
.recs-grid { display: flex; flex-direction: column; gap: 1.1rem; }
.rec-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  background: var(--off-white);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
  display: block;
}
.rec-card:hover { box-shadow: var(--shadow-hover); border-color: var(--champagne); transform: translateY(-3px); }
.rec-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.rec-initials {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--section-head);
  color: var(--champagne);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px var(--gold), 0 4px 10px rgba(31,42,77,.22);
}
.rec-name { font-size: 0.86rem; font-weight: 500; color: var(--ink); margin-bottom: 0.1rem; }
.rec-role { font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-faint); line-height: 1.5; }
.rec-relation { font-family: var(--font-mono); font-size: 0.64rem; color: var(--accent); margin-top: 0.25rem; }
.rec-body {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.7;
  font-style: italic;
  padding-left: 1.1rem;
  border-left: 2px solid var(--gold);
}

/* ====== BLOGS ====== */
.blog-intro { font-size: 0.975rem; color: var(--ink-muted); max-width: 600px; line-height: 1.8; margin-bottom: 2rem; }
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.5rem 1.1rem;
  min-height: 44px;
  font-size: 0.80rem;
  font-family: var(--font-sans);
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: var(--shadow-soft);
}
.filter-btn:hover { background: var(--champagne-soft); color: var(--ink); border-color: var(--gold); }
.filter-btn.active { background: var(--accent); color: var(--off-white); border-color: var(--accent); box-shadow: 0 4px 14px rgba(107,36,55,.24); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.blog-card {
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--gold); }
.blog-card-img {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f6efde, #ece1c8);
  color: var(--section-head);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  border-bottom: 1px solid var(--rule);
}
.blog-card-img.infra { background: linear-gradient(135deg, #f7ecee, #efdadf); color: var(--accent); }
.blog-card-img .b-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: currentColor;
  opacity: 0.8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.blog-card-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; gap: 0.5rem; }
.blog-card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.blog-tag {
  background: var(--parchment);
  color: var(--ink-muted);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 2px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  border: 1px solid var(--rule);
}
.blog-card-title { font-family: var(--font-serif); font-size: 1.12rem; font-weight: 500; line-height: 1.3; color: var(--ink); }
.blog-card-desc { font-size: 0.80rem; color: var(--ink-muted); line-height: 1.65; flex: 1; }
.blog-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.7rem; padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}
.blog-card-meta { font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-faint); }
.blog-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--rule-strong);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  flex-shrink: 0;
  background: var(--cream);
}
.blog-card:hover .blog-arrow { background: var(--accent); border-color: var(--accent); }
.blog-card:hover .blog-arrow svg { stroke: var(--off-white); }
.blog-arrow svg { width: 11px; height: 11px; stroke: var(--ink-muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s; }

/* ====== CONTACT ====== */
.contact-block {
  display: flex; flex-direction: column; gap: 0;
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  max-width: 480px;
}
.contact-row { display: flex; align-items: center; gap: 1.4rem; padding: 0.9rem 1.4rem; border-bottom: 1px solid var(--rule); transition: background 0.2s; }
.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: var(--parchment); }

/* ====== DIGITAL CARD ====== */
.dc-card {
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 500px;
}
.dc-hero {
  background: linear-gradient(160deg, #1f2a4d 0%, #172040 100%);
  padding: 1.9rem 1.7rem 1.6rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  position: relative;
}
.dc-hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: .7;
}
.dc-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  overflow: hidden;
  flex-shrink: 0;
}
.dc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.dc-hero-text { flex: 1; min-width: 0; }
.dc-name { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 500; color: #f6f0e4; line-height: 1.1; margin-bottom: 0.35rem; }
.dc-role { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: #d9c79d; line-height: 1.7; margin-bottom: 0.7rem; }
.dc-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e5d6b0;
  border: 0.5px solid var(--gold);
  padding: 2px 9px;
  border-radius: 100px;
}
.dc-body { padding: 1.2rem 1.7rem; display: flex; flex-direction: column; gap: 0; }
.dc-row { display: flex; align-items: center; gap: 1.4rem; padding: 0; border-bottom: 1px solid var(--rule); transition: color 0.2s; min-height: 48px; }
.dc-row:not(:has(a)) { padding: 0.8rem 0; }
.dc-row:last-child { border-bottom: none; }
.dc-row a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 1.4rem; width: 100%; min-width: 0; min-height: 48px; padding: 0.8rem 0; }
.dc-row:hover { color: var(--accent); }
.dc-row:hover .c-value { color: var(--accent); }
.c-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  width: 90px;
  flex-shrink: 0;
}
.c-value { font-size: 0.80rem; color: var(--ink-muted); text-decoration: none; transition: color 0.25s; min-width: 0; overflow-wrap: anywhere; }
.c-value:hover { color: var(--accent); }
.dc-qr-strip {
  border-top: 1px solid var(--rule);
  padding: 1.1rem 1.7rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--parchment);
}
.dc-qr-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.dc-qr-item canvas { border-radius: 4px; }
.dc-qr-lbl { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); text-align: center; }
.dc-qr-sep { width: 1px; background: var(--rule-strong); align-self: stretch; }

/* ====== EDUCATION ====== */
.edu-block { margin-top: 2.9rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.edu-grid {
  display: flex; flex-direction: column; gap: 0;
  background: var(--off-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin-top: 1.4rem;
}
.edu-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.2rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.edu-item:last-child { border-bottom: none; }
.edu-year { font-family: var(--font-mono); font-size: 0.64rem; color: var(--section-timeframe); font-style: italic; }
.edu-body h4 { font-family: var(--font-serif); font-size: 1.08rem; font-weight: 500; color: var(--ink); margin-bottom: 0.1rem; line-height: 1.3; }
.edu-body span { font-family: var(--font-mono); font-size: 0.64rem; color: var(--accent); letter-spacing: 0.05em; }

/* ====== FOOTER ====== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
}
.f-name { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-muted); letter-spacing: 0.06em; }
.f-domain { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-muted); }
.f-domain span { color: var(--accent); }

/* ====== FEEDBACK WIDGET ====== */
#fb-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(107,36,55,.2), 0 10px 24px rgba(107,36,55,.28);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
#fb-btn:hover { transform: scale(1.06); background: var(--accent-dark); }
#fb-btn svg { width: 22px; height: 22px; fill: #fffdf9; }
#fb-panel {
  position: fixed; bottom: 88px; right: 24px; z-index: 9999;
  width: min(300px, calc(100vw - 32px)); background: var(--off-white); border-radius: var(--radius-md);
  border: 1px solid var(--rule-strong); padding: 20px;
  display: none; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-hover); font-family: inherit;
}
#fb-panel.open { display: flex; }
.fb-title { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 500; color: var(--ink); margin: 0; }
.fb-thumb-row { display: flex; gap: 10px; }
.fb-thumb {
  flex: 1; min-height: 44px; padding: 8px; border-radius: 12px;
  border: 1px solid var(--rule-strong); background: var(--cream);
  cursor: pointer; text-align: center; color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.fb-thumb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fb-thumb:hover, .fb-thumb.selected { background: var(--accent-verylight); border-color: var(--accent); color: var(--accent); }
#fb-comment {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid var(--rule-strong); border-radius: 12px;
  font-size: 13px; resize: none; font-family: inherit;
  outline: none; color: var(--ink); background: var(--off-white);
}
#fb-comment:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-verylight); }
#fb-submit {
  background: var(--accent); color: #fffdf9; border: none;
  border-radius: 100px; padding: 12px; min-height: 44px; font-size: 13px;
  font-weight: 500; cursor: pointer; transition: background 0.25s var(--ease);
}
#fb-submit:hover { background: var(--accent-dark); }
#fb-thanks { font-size: 13px; color: var(--accent); text-align: center; display: none; }
#fb-error { font-size: 13px; color: #9b2c2c; text-align: center; display: none; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .hero-inner { gap: 2rem; }
  .hero-photo { width: 140px; }
  .hero-photo img { width: 140px; height: 180px; border-radius: 70px 70px 20px 20px; }
  .hero-photo::before { border-radius: 70px 70px 20px 20px; }
}
@media (max-width: 600px) {
  .hero-inner { flex-direction: column-reverse; gap: 1.6rem; align-items: flex-start; }
  .hero-photo { width: 96px; margin-right: 0; }
  .hero-photo img { width: 96px; height: 124px; border-radius: 48px 48px 16px 16px; border-width: 3px; }
  .hero-photo::before { border-radius: 48px 48px 16px 16px; transform: translate(7px, 7px); }
  .hero-meta { flex-direction: column; align-items: flex-start; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .timeline-item::before, .timeline-item::after { display: none; }
  .t-period { text-align: left; padding-right: 0; }
  .nav-brand { display: none; }
  .nav-inner { padding: 0 0.5rem; }
  .nav-links {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; width: 100%;
    justify-content: flex-start; padding: 0 0.5rem; gap: 0.1rem;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: 0.65rem; padding: 0.4rem 0.75rem; min-height: 44px; }
  .nav-links a:not(.active) { color: var(--ink-muted); }
  .proj-card, .rec-card, .pub-card { padding: 1.35rem 1.25rem; }
  .proj-section-header { align-items: flex-start; }
  .proj-section-rule { margin-top: 0.7rem; }
  .dc-body, .dc-qr-strip { padding-left: 1.2rem; padding-right: 1.2rem; }
  #fb-btn { bottom: 16px; right: 16px; }
  #fb-panel { right: 16px; bottom: 80px; }
}
@media (max-width: 400px) {
  .c-label { width: 72px; }
  .dc-row, .dc-row a { gap: 0.8rem; }
  .dc-hero { padding: 1.5rem 1.2rem 1.3rem; gap: 0.9rem; }
  .edu-item { grid-template-columns: 44px 1fr; gap: 0.8rem; padding: 1rem; }
  .skills-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tab-panel { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
