/* =========================================================
   AL SHIFAN — PORTFOLIO
   Aesthetic: editorial minimal · warm paper background,
   deep ink text, restrained terracotta accent.
   Type: Helvetica Neue / Söhne-substitute body,
         Instrument Serif italics for emphasis,
         IBM Plex Mono for metadata.
   ========================================================= */

:root {
  /* Palette */
  --paper:        #f4f1ec;
  --paper-deep:   #ebe7df;
  --ink:          #1a1916;
  --ink-2:        #4a4843;
  --ink-3:        #7a766e;
  --ink-4:        #a8a49a;
  --rule:         #d9d4c8;
  --rule-strong:  #c4bfb1;
  --accent:       #b14a2c;   /* deep terracotta */
  --accent-soft:  #e8d5cc;
  --accent-tint:  rgba(177, 74, 44, 0.08);

  /* Type */
  --serif:  'Instrument Serif', 'Times New Roman', serif;
  --sans:   'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --mono:   'IBM Plex Mono', ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.9, 0.28, 1);
  --t: 0.4s var(--ease);

  /* Geometry */
  --maxw: 1240px;
  --pad: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--t); }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

em, .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ====== SHELL ====== */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 1;
}
section { padding: 120px 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }

/* ====== NAV ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(244, 241, 236, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand-mark {
  width: 32px; height: 32px;
  color: var(--ink);
  display: grid; place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.brand-role {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-2);
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }

.nav-cta { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; padding: 8px; color: var(--ink); }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 6px;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  background: transparent;
  transition: all var(--t);
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); background: var(--paper-deep); }
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn-ghost { border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-deep); border-color: var(--rule); }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn-accent:hover { background: #9a3d23; border-color: #9a3d23; }

/* ====== SECTION HEAD ====== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 72px;
  flex-wrap: wrap;
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.section-eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--ink-3);
}
.section-title {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 720px;
}
.section-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ====== HERO ====== */
.hero {
  min-height: 92vh;
  padding: 180px 0 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--paper);
  margin-bottom: 40px;
}
.hero-tag .dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
}
.hero-tag .dot::after {
  content: '';
  width: 6px; height: 6px;
  background: var(--paper);
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(3rem, 6.5vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 32px;
}
.hero h1 .em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  color: var(--ink-2);
  max-width: 520px;
  line-height: 1.55;
  margin-bottom: 44px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.stat-num {
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat-num span { color: var(--ink-3); font-size: 1rem; letter-spacing: 0; }
.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 6px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
}
.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.02);
}
.hero-visual-meta {
  position: absolute;
  left: 16px; bottom: 16px; right: 16px;
  z-index: 2;
  display: flex; justify-content: space-between; align-items: end;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--paper);
  letter-spacing: 0.06em;
  mix-blend-mode: difference;
}

/* ====== ABOUT ====== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
}
.about-card { padding: 0; }
.about-card h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.about-card p {
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 56ch;
}
.about-card strong { color: var(--ink); font-weight: 500; }
.about-meta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  line-height: 1.8;
}

.about-aside { display: flex; flex-direction: column; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.aside-block { background: var(--paper); padding: 22px 24px; }
.aside-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.aside-value {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.aside-meta {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.5;
}

/* ====== STACK ====== */
.stack {
  margin-top: 96px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 0.5fr repeat(4, 1fr);
  gap: 32px;
}
.stack-head {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.stack-col h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.stack-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.stack-col li {
  font-size: 13.5px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

/* ====== TIMELINE ====== */
.timeline {
  max-width: 880px;
  margin: 0 auto;
}
.tl-row {
  display: grid;
  grid-template-columns: 160px 24px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.tl-row:last-child { border-bottom: 1px solid var(--rule); }
.tl-row.in-view { opacity: 1; transform: none; }
.tl-row.current { background: var(--accent-tint); margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
.tl-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  padding-top: 4px;
}
.tl-row.current .tl-date { color: var(--accent); }
.tl-node {
  position: relative;
  width: 24px;
  display: grid; place-items: center;
  padding-top: 7px;
}
.tl-node::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink-3);
  transition: all 0.5s var(--ease);
}
.tl-row.in-view .tl-node::before { border-color: var(--ink); background: var(--ink); }
.tl-row.current .tl-node::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-tint); }
.tl-title {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.015em;
}
.tl-org {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.tl-desc {
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.6;
}

/* ====== WORK / PROJECTS ====== */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.proj {
  background: var(--paper);
  padding: 32px;
  display: flex; flex-direction: column;
  transition: background var(--t);
  position: relative;
  min-height: 280px;
}
.proj:hover { background: var(--paper-deep); }
.proj.featured {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
  padding: 0;
  min-height: 360px;
}
.proj.featured .proj-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.proj.featured .proj-img { aspect-ratio: auto; height: 100%; border: none; border-left: 1px solid var(--rule); }
.proj.half { grid-column: span 6; }
.proj.third { grid-column: span 4; }
.proj-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.proj h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.proj.featured h3 { font-size: 1.9rem; font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; }
.proj.featured h3 .em { font-family: var(--serif); font-style: italic; color: var(--accent); }
.proj p { color: var(--ink-2); font-size: 14px; line-height: 1.6; margin-bottom: 18px; flex-grow: 1; }
.proj.featured p { font-size: 1rem; max-width: 50ch; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  background: var(--paper);
}
.proj-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.proj-foot .icons { display: flex; gap: 14px; font-size: 14px; }
.proj-foot a:hover { color: var(--accent); }

.proj-img {
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--paper-deep);
}
.proj-img img { width:100%; height:100%; object-fit: cover; }

/* ====== CODE & SORCERY ====== */
.sorcery-head { margin-bottom: 56px; }
.sorcery-head h2 .em { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400; }
.sup { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.sup strong { color: var(--ink-2); font-weight: 500; }
.sup a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sup a:hover { color: var(--ink); }

.sorcery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.sorc-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  transition: all var(--t);
  position: relative;
  display: flex; flex-direction: column;
}
.sorc-card:hover { border-color: var(--ink); }
.sorc-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--rule);
}
.sorc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.sorc-card:hover .sorc-img img { transform: scale(1.04); }
.sorc-body { padding: 22px 24px; flex-grow: 1; }
.sorc-cat {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.sorc-card h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: 8px; letter-spacing: -0.015em; }
.sorc-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }

.sorc-card .admin-row,
.feed-card .admin-row { display: none; padding: 12px 24px 18px; gap: 8px; border-top: 1px solid var(--rule); }
body.admin-on .sorc-card .admin-row,
body.admin-on .feed-card .admin-row { display: flex; }
.add-sorc-btn, .add-post-btn { display: none; }
body.admin-on .add-sorc-btn,
body.admin-on .add-post-btn { display: inline-flex; }

/* ====== FEED ====== */
.feed-head { margin-bottom: 32px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.feed-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 14px 18px;
  margin-bottom: 28px;
  line-height: 1.6;
  border-radius: 4px;
}
.feed-note strong { color: var(--ink); font-weight: 500; }
.feed-note code { background: var(--paper); padding: 1px 6px; border: 1px solid var(--rule); border-radius: 3px; font-size: 11px; }
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feed-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0;
  display: flex; flex-direction: column;
  transition: all var(--t);
}
.feed-card:hover { border-color: var(--ink); }
.feed-card-inner { padding: 22px 24px; }
.feed-head-row {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.feed-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  overflow: hidden;
  flex-shrink: 0;
}
.feed-avatar img { width:100%; height:100%; object-fit: cover; }
.feed-id h4 { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.feed-id span { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.02em; }
.feed-li { margin-left: auto; color: #0a66c2; font-size: 16px; }
.feed-content {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 14px;
}
.feed-tags { font-size: 11.5px; color: var(--accent); font-family: var(--mono); letter-spacing: 0.02em; }

/* ====== CONTACT ====== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.contact-card { background: var(--paper); padding: 44px; }
.contact-card h3 { font-size: 1.6rem; font-weight: 400; letter-spacing: -0.025em; margin-bottom: 20px; }
.contact-card p { color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 42ch; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.contact-list li {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px;
  color: var(--ink);
}
.contact-list i { color: var(--ink-3); width: 16px; text-align: center; font-size: 13px; }
.socials { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

/* ====== FOOTER ====== */
footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ====== REVEAL ====== */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ====== MODALS ====== */
.admin-modal {
  position: fixed; inset: 0;
  background: rgba(26, 25, 22, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-modal.open { display: flex; }
.admin-box {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 36px;
  max-width: 420px;
  width: 100%;
  position: relative;
}
.admin-box h3 { font-size: 1.4rem; font-weight: 500; margin-bottom: 6px; letter-spacing: -0.02em; }
.admin-box .sub { font-size: 13px; color: var(--ink-3); margin-bottom: 24px; }
.admin-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.admin-field label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.admin-field input, .admin-field textarea {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
}
.admin-field input:focus, .admin-field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.admin-field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.admin-err {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  margin-top: 8px;
  display: none;
}
.admin-err.show { display: block; }
.admin-ok {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #4a7a4e;
  margin-top: 8px;
  display: none;
}
.admin-ok.show { display: block; }
.admin-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--ink-3);
  border-radius: 4px;
}
.admin-close:hover { color: var(--ink); background: var(--paper-deep); }

.admin-bar {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
body.admin-on .admin-bar { display: flex; }
.admin-bar .status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper);
  letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 8px;
}
.admin-bar .status::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: ping 2s infinite;
}
.admin-bar .btn { border-color: rgba(255,255,255,0.2); color: var(--paper); }
.admin-bar .btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
@keyframes ping {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.login-link {
  position: fixed;
  bottom: 16px; left: 16px;
  z-index: 50;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 4px;
  opacity: 0.5;
}
.login-link:hover { opacity: 1; color: var(--ink); background: var(--paper-deep); }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { max-width: 440px; margin: 0 auto; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .stack-head { grid-column: span 2; }
  .sorcery-grid { grid-template-columns: 1fr 1fr; }
  .feed-grid { grid-template-columns: 1fr 1fr; }
  .proj.featured { grid-template-columns: 1fr; }
  .proj.featured .proj-img { border-left: none; border-top: 1px solid var(--rule); aspect-ratio: 16/9; }
  .proj.half { grid-column: span 6; }
  .timeline { max-width: 100%; }
}

@media (max-width: 720px) {
  :root { --pad: 20px; }
  section { padding: 80px 0; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 12px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .menu-btn { display: grid; place-items: center; }
  .nav-cta .btn:not(.btn-primary) { display: none; }
  .tl-row { grid-template-columns: 90px 18px 1fr; gap: 16px; padding: 22px 0; }
  .tl-date { font-size: 10.5px; }
  .sorcery-grid, .feed-grid { grid-template-columns: 1fr; }
  .proj.half, .proj.third { grid-column: span 12; }
  .contact-grid { grid-template-columns: 1fr; }
  .stack { grid-template-columns: 1fr; gap: 24px; }
  .stack-head { grid-column: span 1; }
  .hero-stats { grid-template-columns: repeat(2,1fr); gap: 20px; }
  .contact-card { padding: 28px; }
  .section-head { margin-bottom: 48px; }
}