/* ============================================================
   habibur.dev — portfolio
   Design system: IDE / code-editor themed, deep-dark canvas,
   blue → cyan → green glow.
   ============================================================ */

:root {
  /* canvas */
  --bg:        #070b12;
  --bg-2:      #0a0f18;
  --panel:     #0d1522;
  --panel-2:   #101a2b;
  --surface:   #13203360;
  --line:      rgba(255, 255, 255, 0.07);
  --line-2:    rgba(255, 255, 255, 0.12);

  /* ink */
  --text:      #e7eef8;
  --muted:     #8a9bb4;
  --faint:     #5d6e87;

  /* accents */
  --blue:      #4d8dff;
  --blue-deep: #2a6fdb;
  --cyan:      #5aa2ff;
  --green:     #4d8dff;
  --grad:      #2f80ff;          /* solid blue — buttons & accents */

  /* syntax */
  --sx-key:    #5fa8ff;
  --sx-str:    #7fb6ff;
  --sx-num:    #f2b25b;
  --sx-prop:   #b9c6dd;
  --sx-com:    #56708f;
  --sx-fn:     #8aa0ff;

  /* type */
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1180px;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient background ------------------------------------------------ */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(620px 520px at 12% -4%, rgba(77, 141, 255, 0.20), transparent 60%),
    radial-gradient(680px 600px at 100% 18%, rgba(77, 141, 255, 0.13), transparent 62%),
    radial-gradient(720px 700px at 78% 108%, rgba(77, 141, 255, 0.13), transparent 60%),
    var(--bg);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}

/* layout ------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
section { position: relative; padding: 104px 0; }
.section-head { margin-bottom: 46px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--cyan); opacity: 0.7; }
.eyebrow .idx { color: var(--faint); }
h2.title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}
.lead { color: var(--muted); max-width: 60ch; font-size: 1.06rem; }

/* glow gradient text */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===================================================================
   NAV
   =================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(8, 12, 19, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-weight: 600; }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: var(--blue); }
.dots i:nth-child(2) { background: var(--cyan); }
.dots i:nth-child(3) { background: var(--green); }
.brand b { font-weight: 600; letter-spacing: -0.01em; }
.brand b span { color: var(--cyan); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: #ffffff;
  background: var(--grad);
  border: none;
  padding: 9px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 24px -8px rgba(47, 128, 255, 0.65);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta { white-space: nowrap; }
/* higher specificity than `.nav-links a` so the resume button stays solid blue + white */
.nav-links a.nav-cta { color: #ffffff; }
.nav-links a.nav-cta:hover { color: #ffffff; background: var(--blue); }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(47, 128, 255, 0.85); }
.nav-burger { display: none; background: none; border: 1px solid var(--line-2); color: var(--text);
  border-radius: 9px; width: 40px; height: 38px; cursor: pointer; font-size: 1.1rem; }

/* ===================================================================
   HERO
   =================================================================== */
.hero { padding-top: 150px; padding-bottom: 88px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 54px;
  align-items: center;
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--cyan);
  margin: 0 0 22px;
  display: inline-flex; align-items: center; gap: 10px;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(77, 141, 255, 0.7); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(77, 141, 255, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(77, 141, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 141, 255, 0); }
}
.hero h1 {
  font-size: clamp(2.9rem, 7vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 20px;
}
.hero h1 .glow { filter: drop-shadow(0 0 26px rgba(77, 141, 255, 0.35)); }
.hero-sub { color: var(--muted); font-size: 1.18rem; max-width: 46ch; margin: 0 0 34px; }
.hero-sub b { color: var(--text); font-weight: 500; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.92rem; font-weight: 500;
  padding: 13px 22px; border-radius: 12px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary { background: var(--grad); color: #ffffff; font-weight: 600;
  box-shadow: 0 10px 34px -10px rgba(47, 128, 255, 0.6); }
.btn-primary:hover { transform: translateY(-2px); background: var(--blue); box-shadow: 0 16px 40px -10px rgba(47, 128, 255, 0.9); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(77, 141, 255, 0.08); transform: translateY(-2px); }

.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats .stat .n { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.hero-stats .stat .l { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); margin-top: 6px; }

/* editor window */
.editor {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 26, 43, 0.92), rgba(10, 15, 24, 0.92));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(77, 141, 255, 0.05),
    0 0 80px -30px rgba(77, 141, 255, 0.35);
  overflow: hidden;
  backdrop-filter: blur(6px);
}
.editor-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 15px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.editor-bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.tabs { display: flex; gap: 4px; align-items: center; }
.tabs .tab {
  font-family: var(--mono); font-size: 0.78rem; color: var(--faint);
  padding: 5px 12px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.tabs .tab.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.tabs .tab .dot-file { color: var(--cyan); }
.code {
  font-family: var(--mono); font-size: 0.9rem; line-height: 1.85;
  padding: 20px 20px 24px; margin: 0; overflow-x: auto;
}
.code .ln {
  display: grid; grid-template-columns: 26px 1fr; gap: 16px;
}
/* hidden only when JS is active + motion allowed; visible by default for print/no-js */
.js .code .ln { opacity: 0; transform: translateY(6px); transition: opacity 0.42s ease, transform 0.42s ease; }
.js .code .ln.in { opacity: 1; transform: none; }
.code .gut { color: var(--faint); text-align: right; -webkit-user-select: none; user-select: none; opacity: 0.55; }
.sx-key { color: var(--sx-key); } .sx-str { color: var(--sx-str); } .sx-num { color: var(--sx-num); }
.sx-prop { color: var(--sx-prop); } .sx-com { color: var(--sx-com); font-style: italic; } .sx-fn { color: var(--sx-fn); }
.sx-punct { color: var(--muted); }
.cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--cyan); vertical-align: text-bottom;
  margin-left: 2px; animation: blink 1.1s steps(2) infinite; box-shadow: 0 0 8px var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

/* ===================================================================
   ABOUT
   =================================================================== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-body p { color: var(--muted); font-size: 1.12rem; margin: 0 0 20px; }
.about-body p b { color: var(--text); font-weight: 500; }
.fact-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 8px 22px;
}
.fact-card .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.9rem;
}
.fact-card .row:last-child { border-bottom: none; }
.fact-card .row .k { color: var(--faint); }
.fact-card .row .v { color: var(--text); text-align: right; }
.fact-card .row .v.ok { color: var(--green); }

/* ===================================================================
   SKILLS
   =================================================================== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 24px 22px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.skill-card:hover { transform: translateY(-4px); border-color: var(--line-2);
  box-shadow: 0 24px 50px -30px rgba(77, 141, 255, 0.5); }
.skill-card .sc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.skill-card .sc-ico {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(77, 141, 255, 0.1); border: 1px solid rgba(77, 141, 255, 0.22); color: var(--cyan);
}
.skill-card .sc-ico svg { width: 18px; height: 18px; }
.skill-card h3 { font-size: 1.02rem; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap;
  padding: 5px 11px; border-radius: 8px; background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line); transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.skill-card:hover .chip { color: var(--text); }
.chip:hover { color: var(--cyan); border-color: rgba(77, 141, 255, 0.4); background: rgba(77, 141, 255, 0.07); }

/* ===================================================================
   EXPERIENCE
   =================================================================== */
.timeline { position: relative; margin-left: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--cyan), var(--green), transparent);
  opacity: 0.5;
}
.tl-item { position: relative; padding: 0 0 34px 42px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node {
  position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 0 4px rgba(77, 141, 255, 0.12);
}
.tl-item:first-child .tl-node { border-color: var(--green); box-shadow: 0 0 14px var(--green), 0 0 0 4px rgba(77, 141, 255, 0.18); }
.tl-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 22px 24px; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.tl-card:hover { border-color: var(--line-2); transform: translateX(3px);
  box-shadow: 0 22px 50px -34px rgba(77, 141, 255, 0.6); }
.tl-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.tl-role { font-size: 1.16rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.tl-date { font-family: var(--mono); font-size: 0.8rem; color: var(--cyan); white-space: nowrap; }
.tl-co { font-family: var(--mono); font-size: 0.86rem; color: var(--muted); margin: 0 0 14px; }
.tl-co .badge { color: var(--faint); }
.tl-bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.tl-bullets li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.98rem; }
.tl-bullets li::before { content: "›"; position: absolute; left: 4px; top: -1px; color: var(--cyan); font-family: var(--mono); }

/* ===================================================================
   SERVICES
   =================================================================== */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 28px 24px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.svc-card:hover { transform: translateY(-5px); border-color: var(--line-2);
  box-shadow: 0 28px 56px -32px rgba(77, 141, 255, 0.5); }
.svc-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(77, 141, 255, 0.1); border: 1px solid rgba(77, 141, 255, 0.24); color: var(--blue);
}
.svc-ico svg { width: 22px; height: 22px; }
.svc-card h3 { font-size: 1.12rem; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; }
.svc-card p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* learning chip (e.g. Shopify App Dev) */
.chip.chip-learn {
  color: var(--blue); border-color: rgba(77, 141, 255, 0.4);
  background: rgba(77, 141, 255, 0.08); border-style: dashed;
}
.chip.chip-learn em {
  font-style: normal; font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--faint); margin-left: 3px;
}

/* ===================================================================
   EDUCATION
   =================================================================== */
.edu-card {
  display: flex; align-items: center; gap: 26px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 30px 32px; flex-wrap: wrap;
}
.edu-badge {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(77, 141, 255, 0.1); border: 1px solid rgba(77, 141, 255, 0.28); color: var(--blue);
}
.edu-badge svg { width: 30px; height: 30px; }
.edu-card .deg { font-size: 1.2rem; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
.edu-card .inst { color: var(--muted); font-family: var(--mono); font-size: 0.9rem; margin: 0; }
.edu-card .when { margin-left: auto; font-family: var(--mono); font-size: 0.82rem; color: var(--cyan);
  border: 1px solid rgba(77, 141, 255, 0.3); padding: 7px 14px; border-radius: 9px; }

/* ===================================================================
   AI CHAT
   =================================================================== */
.ai-shell {
  border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 26, 43, 0.85), rgba(9, 14, 23, 0.92));
  box-shadow: 0 50px 110px -50px rgba(0, 0, 0, 0.95), 0 0 90px -40px rgba(77, 141, 255, 0.4);
  display: flex; flex-direction: column; min-height: 520px;
}
.ai-bar {
  display: flex; align-items: center; gap: 13px; padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.ai-bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.ai-bar .ai-title { font-family: var(--mono); font-size: 0.86rem; color: var(--muted); }
.ai-bar .ai-title b { color: var(--text); font-weight: 600; }
.ai-bar .ai-live { margin-left: auto; font-family: var(--mono); font-size: 0.74rem; color: var(--green);
  display: inline-flex; align-items: center; gap: 7px; }
.ai-bar .ai-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.ai-log {
  flex: 1; overflow-y: auto; padding: 26px 24px; display: flex; flex-direction: column; gap: 18px;
}
.msg { display: flex; gap: 13px; max-width: 86%; }
.msg .av {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
}
.msg.bot .av { background: var(--grad); color: #ffffff; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .av { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); color: var(--muted); }
.bubble {
  padding: 13px 17px; border-radius: 13px; font-size: 0.98rem; line-height: 1.6;
}
.msg.bot .bubble { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.me .bubble { background: rgba(77, 141, 255, 0.1); border: 1px solid rgba(77, 141, 255, 0.28);
  color: var(--text); border-top-right-radius: 4px; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.bubble strong { color: var(--text); font-weight: 600; }
.bubble code { font-family: var(--mono); font-size: 0.86em; background: rgba(77, 141, 255, 0.12);
  border: 1px solid rgba(77, 141, 255, 0.22); border-radius: 5px; padding: 1px 5px; color: var(--blue); }
.bubble ul, .bubble ol { margin: 4px 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.bubble ul:last-child, .bubble ol:last-child { margin-bottom: 0; }
.bubble li { padding-left: 2px; }
.bubble li::marker { color: var(--blue); }
.bubble .md-h { font-weight: 600; color: var(--text); margin: 0 0 6px; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan);
  margin-right: 4px; animation: tdot 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.18s; } .typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes tdot { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.ai-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; }
.ai-suggest button {
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted); cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); padding: 8px 13px; border-radius: 10px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.ai-suggest button:hover { color: var(--cyan); border-color: rgba(77, 141, 255, 0.4); background: rgba(77, 141, 255, 0.07); }
.ai-input { display: flex; gap: 10px; padding: 16px 18px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.ai-input .prompt { font-family: var(--mono); color: var(--cyan); align-self: center; }
.ai-input input {
  flex: 1; background: transparent; border: none; outline: none; color: var(--text);
  font-family: var(--mono); font-size: 0.95rem;
}
.ai-input input::placeholder { color: var(--faint); }
.ai-send {
  background: var(--grad); border: none; color: #ffffff; width: 42px; height: 42px; border-radius: 11px;
  cursor: pointer; display: grid; place-items: center; transition: transform 0.2s, box-shadow 0.2s;
}
.ai-send:hover { transform: translateY(-1px); background: var(--blue); box-shadow: 0 8px 22px -6px rgba(47, 128, 255, 0.75); }
.ai-send:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.ai-send svg { width: 18px; height: 18px; }

/* floating launcher */
.ai-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--grad); color: #ffffff; font-family: var(--mono); font-weight: 600; font-size: 0.86rem;
  border: none; border-radius: 14px; padding: 13px 18px; cursor: pointer;
  box-shadow: 0 14px 40px -12px rgba(47, 128, 255, 0.75);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
}
.ai-fab:hover { transform: translateY(-2px); background: var(--blue); box-shadow: 0 20px 50px -12px rgba(47, 128, 255, 0.95); }
.ai-fab svg { width: 18px; height: 18px; }

/* ===================================================================
   CONTACT / FOOTER
   =================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.contact-cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 18px; font-weight: 600; }
.contact-cta p { color: var(--muted); font-size: 1.1rem; margin: 0 0 28px; max-width: 42ch; }
.contact-list { display: grid; gap: 12px; }
.contact-row {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel); padding: 16px 20px;
  transition: border-color 0.22s, transform 0.22s, background 0.22s;
}
.contact-row:hover { border-color: rgba(77, 141, 255, 0.4); transform: translateX(4px); background: var(--panel-2); }
.contact-row .ci {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(77, 141, 255, 0.1); border: 1px solid rgba(77, 141, 255, 0.22); color: var(--cyan);
}
.contact-row .ci svg { width: 19px; height: 19px; }
.contact-row .cl { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); }
.contact-row .cv { color: var(--text); font-size: 0.98rem; }
.contact-row .arr { margin-left: auto; color: var(--faint); transition: color 0.2s, transform 0.2s; }
.contact-row:hover .arr { color: var(--cyan); transform: translateX(3px); }

footer {
  border-top: 1px solid var(--line); padding: 30px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
footer .f-brand { font-family: var(--mono); color: var(--muted); font-size: 0.88rem; }
footer .f-brand span { color: var(--cyan); }
footer .f-note { font-family: var(--mono); color: var(--faint); font-size: 0.8rem; }

/* mobile menu hidden by default; shown only when nav is open on small screens */
.mobile-menu { display: none; }

/* ---- overflow hardening: let flex/grid children shrink, break long tokens ---- */
img, svg, video, canvas, pre { max-width: 100%; }
.hero-grid > *, .about-grid > *, .contact-grid > * { min-width: 0; }
.hero-editor, .editor { min-width: 0; max-width: 100%; }
.skill-card, .svc-card, .tl-card { min-width: 0; }
.contact-row > span { min-width: 0; }
.contact-row .cv, .bubble { overflow-wrap: anywhere; }

/* reveal on scroll — visible by default; hidden only when JS active so print/no-js never traps content */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .skills-grid, .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { padding: 12px 18px; }
  .nav-links { display: none; }
  .nav-burger { display: grid; place-items: center; }
  .nav.mobile-open + .mobile-menu { display: flex; }
  .mobile-menu {
    position: fixed; top: 62px; left: 14px; right: 14px; z-index: 49;
    flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px;
    background: rgba(10, 15, 24, 0.96); border: 1px solid var(--line-2); backdrop-filter: blur(14px);
  }
  .mobile-menu a { font-family: var(--mono); font-size: 0.95rem; color: var(--muted); text-decoration: none; padding: 11px 14px; border-radius: 9px; }
  .mobile-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
  section { padding: 74px 0; }
  .hero { padding-top: 116px; }
  .hero-stats { gap: 22px; }
  .skills-grid, .svc-grid { grid-template-columns: 1fr; }
  .edu-card { gap: 18px; padding: 24px; }
  .edu-card .when { margin-left: 0; }
  .ai-fab span { display: none; }
  .ai-fab { right: 18px; bottom: 18px; padding: 14px; border-radius: 50%; }
  .wrap { padding: 0 18px; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js .reveal, .js .code .ln { opacity: 1 !important; transform: none !important; }
}
