/* ============================================================
   styles.css  —  Visual design. Edit if you want to tweak
                  colours, spacing, fonts, or layout.
   ============================================================ */

/* ---- reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: #0a0c12; color: #e8ebf0;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  line-height: 1.6; overflow-x: hidden;
}
::selection { background: rgba(77,139,251,0.30); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }
input:focus, textarea:focus { outline: none; }

/* ---- CSS variables ---- */
:root { --accent: #4d8bfb; }

/* ---- animations ---- */
@keyframes blink   { 0%,49% { opacity:1 } 50%,100% { opacity:0 } }
@keyframes floaty  { 0%,100% { transform:translateY(0) } 50% { transform:translateY(-8px) } }

/* ---- scroll-progress bar ---- */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 70;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  width: 0%; transition: width .1s linear;
}

/* ---- background decorations ---- */
#bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 80%);
}
#bg-glow {
  position: fixed; top: -180px; left: 50%; transform: translateX(-50%);
  width: 760px; height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at center, var(--accent), transparent 65%);
  opacity: 0.16; filter: blur(20px);
}

/* ---- nav ---- */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(10,12,18,0.72);
  border-bottom: 1px solid #1b2230;
}
.nav-inner {
  position: relative; max-width: 1120px; margin: 0 auto;
  padding: 14px 28px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.nav-logo {
  color: #e8ebf0; font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 9px;
}
.nav-logo-dot {
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.nav-logo-accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  padding: 7px 12px; border-radius: 7px; color: #8a93a3;
  background: transparent; transition: color .15s, background .15s;
}
.nav-links a:hover { color: #e8ebf0; }
.nav-links a.active { color: var(--accent); background: rgba(77,139,251,0.10); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500;
  color: #0a0c12; background: var(--accent);
  padding: 8px 16px; border-radius: 7px; transition: opacity .15s;
}
.nav-cta:hover { opacity: 0.9; }
.hamburger {
  display: none; width: 40px; height: 40px; align-items: center;
  justify-content: center; background: #12151d; border: 1px solid #232a36;
  border-radius: 9px; color: #c4ccd8; font-size: 18px; line-height: 1;
  transition: border-color .15s, color .15s;
}
.hamburger:hover { border-color: var(--accent); color: var(--accent); }

/* ---- mobile nav ---- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px; background: rgba(12,15,22,0.97);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid #1b2230; box-shadow: 0 24px 40px rgba(0,0,0,0.5);
  }
  .nav-links.open a { font-size: 15px !important; padding: 12px 14px !important; }
}

/* ---- layout utilities ---- */
.pad-x { padding-left: 28px; padding-right: 28px; }
.main-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.section { scroll-margin-top: 90px; padding: 64px 0; }

/* ---- hero ---- */
.hero {
  scroll-margin-top: 90px; min-height: 88vh;
  display: grid; grid-template-columns: 1.25fr 0.9fr;
  gap: 56px; align-items: center; padding: 72px 0 56px;
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 14px;
  color: var(--accent); margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--accent); }
.hero-name {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(40px, 6.5vw, 76px); line-height: 1.02;
  letter-spacing: -0.03em; margin: 0 0 18px;
}
.hero-cursor { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(19px, 2.4vw, 26px); color: #aab3c2;
  margin: 0 0 14px; font-weight: 500;
}
.hero-desc { font-size: 17px; color: #8a93a3; max-width: 520px; margin: 0 0 32px; }
.hero-desc em { color: #c4ccd8; font-style: normal; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-primary {
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 500;
  color: #0a0c12; background: var(--accent);
  padding: 13px 22px; border-radius: 9px; transition: transform .15s;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-outline {
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 500;
  color: #e8ebf0; border: 1px solid #2a3340;
  padding: 13px 22px; border-radius: 9px;
  transition: border-color .15s, color .15s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.hero-social { display: flex; gap: 18px; margin-top: 30px; }
.hero-social a {
  color: #8a93a3; font-family: 'JetBrains Mono', monospace; font-size: 13px;
  transition: color .15s;
}
.hero-social a:hover { color: var(--accent); }

/* ---- photo card ---- */
.photo-wrap {
  position: relative; justify-self: center;
  animation: floaty 6s ease-in-out infinite;
}
.photo-glow {
  position: absolute; inset: -1px; border-radius: 18px;
  background: linear-gradient(140deg, var(--accent), transparent 60%); opacity: 0.5;
}
.photo-perspective {
  position: relative; width: 300px; height: 360px;
  perspective: 1200px; cursor: pointer;
}
.photo-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .7s cubic-bezier(.22,1,.36,1);
  transform-style: preserve-3d;
}
.photo-inner.flipped { transform: rotateY(180deg); }
.photo-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  -webkit-backface-visibility: hidden; border-radius: 17px; overflow: hidden;
  border: 1px solid #232a36; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
.photo-front {
  background: repeating-linear-gradient(135deg,#11151e,#11151e 11px,#0e121a 11px,#0e121a 22px);
}
.photo-back {
  transform: rotateY(180deg);
  border-color: rgba(77,139,251,0.35);
  background: repeating-linear-gradient(135deg,#121a2b,#121a2b 11px,#0e1422 11px,#0e1422 22px);
}
.photo-placeholder-icon {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px dashed #3a4453;
  display: flex; align-items: center; justify-content: center;
  color: #4a5568; font-size: 24px;
}
.photo-back .photo-placeholder-icon { border-color: var(--accent); color: var(--accent); }
.photo-face img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.photo-placeholder-label {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #5a6677; text-align: center; padding: 0 20px;
}
.photo-back .photo-placeholder-label { color: #7d96d6; }
.photo-flip-hint {
  position: absolute; bottom: 12px; right: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #4a5568;
}
.photo-back .photo-flip-hint { color: #5e76b8; }
.photo-badge {
  position: absolute; bottom: -14px; left: -14px;
  background: #12151d; border: 1px solid #232a36; border-radius: 9px;
  padding: 8px 13px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: #aab3c2; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.badge-dot { color: #0fae8e; }

/* ---- section headings ---- */
.section-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.02em;
  margin: 0 0 28px;
}

/* ---- about ---- */
.about-grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 48px; align-items: start;
}
.about-bio { color: #aeb6c4; font-size: 17px; }
.about-bio p { margin: 0 0 16px; }
.about-bio p:last-child { margin-bottom: 0; }
.about-bio strong { color: #e8ebf0; font-weight: 400; }
.glance-card {
  border: 1px solid #1f2733; border-radius: 14px;
  padding: 22px; background: linear-gradient(180deg, #11151e, #0d111a);
}
.glance-label {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #5a6677; margin-bottom: 16px;
}
.glance-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid #1a2230; font-size: 14px;
}
.glance-row:last-child { border-bottom: none; }
.glance-key { color: #8a93a3; }
.glance-val { color: #e8ebf0; font-family: 'JetBrains Mono', monospace; text-align: right; }

/* ---- skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.skill-group {
  border: 1px solid #1f2733; border-radius: 14px;
  padding: 20px; background: #0e121a;
}
.skill-group-title {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--accent); margin-bottom: 14px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  font-size: 13px; color: #c4ccd8; background: #161b25;
  border: 1px solid #232a36; border-radius: 7px; padding: 6px 11px;
}

/* ---- experience ---- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: linear-gradient(180deg, var(--accent), #1f2733);
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -30px; top: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #0a0c12; border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(77,139,251,0.12);
}
.timeline-header {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 10px; margin-bottom: 4px;
}
.timeline-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 600;
}
.timeline-company { color: var(--accent); font-size: 15px; }
.timeline-period {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #6b7585; margin-bottom: 10px;
}
.timeline-desc { color: #9aa3b2; font-size: 15px; max-width: 660px; }

/* ---- projects ---- */
.projects-header {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: flex-end; justify-content: space-between; margin-bottom: 30px;
}
.projects-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(28px,4vw,42px); letter-spacing: -0.02em; margin: 0 0 6px;
}
.projects-subtitle { color: #8a93a3; font-size: 16px; }
.filter-tabs {
  display: flex; gap: 6px; background: #0e121a;
  border: 1px solid #1f2733; border-radius: 10px; padding: 4px;
}
.filter-tab {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
  padding: 7px 14px; border-radius: 7px; color: #8a93a3;
  background: transparent; transition: color .15s, background .15s;
}
.filter-tab.active { color: #0a0c12; background: var(--accent); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}
.project-card {
  border: 1px solid #1f2733; border-radius: 16px; overflow: hidden;
  background: #0e121a; display: flex; flex-direction: column;
  cursor: pointer; transition: transform .18s, border-color .18s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.project-thumb {
  height: 150px;
  background: repeating-linear-gradient(135deg,#141a25,#141a25 12px,#10141d 12px,#10141d 24px);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #1f2733; position: relative;
}
.project-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.project-thumb-label {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #4a5568;
}
.project-kind {
  position: absolute; top: 12px; left: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent);
  background: rgba(77,139,251,0.10); border: 1px solid rgba(77,139,251,0.25);
  padding: 3px 8px; border-radius: 6px;
}
.project-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.project-name { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 600; margin: 0 0 8px; }
.project-desc { color: #9aa3b2; font-size: 14px; margin: 0 0 16px; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.project-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: #8a93a3; background: #161b25; border-radius: 5px; padding: 4px 8px;
}
.project-links {
  display: flex; gap: 16px; align-items: center;
  border-top: 1px solid #1a2230; padding-top: 14px;
}
.project-links a {
  color: #c4ccd8; font-family: 'JetBrains Mono', monospace; font-size: 13px;
  transition: color .15s;
}
.project-links a:hover { color: var(--accent); }
.project-links a.hidden { display: none; }
.project-case-link {
  margin-left: auto; color: var(--accent);
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
}

/* ---- certs ---- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.cert-card {
  border: 1px solid #1f2733; border-radius: 14px; padding: 20px;
  background: #0e121a; display: flex; gap: 15px; align-items: flex-start;
  transition: border-color .15s; text-decoration: none; color: inherit;
}
.cert-card:hover { border-color: var(--accent); }
.cert-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(77,139,251,0.10); border: 1px solid rgba(77,139,251,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 19px;
}
.cert-name { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.cert-issuer { color: #8a93a3; font-size: 13px; }
.cert-year { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); margin-top: 6px; }

/* ---- contact ---- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 0.85fr;
  gap: 40px; align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-input, .form-textarea {
  background: #0e121a; border: 1px solid #232a36; border-radius: 9px;
  padding: 13px 14px; color: #e8ebf0; font-size: 14px;
  transition: border-color .15s; width: 100%;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder, .form-textarea::placeholder { color: #5a6677; }
.form-textarea { resize: vertical; }
.form-submit {
  align-self: flex-start; font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 500; color: #0a0c12;
  background: var(--accent); padding: 13px 26px; border-radius: 9px;
  transition: opacity .15s;
}
.form-submit:hover { opacity: 0.9; }
.form-success {
  display: none; border: 1px solid rgba(15,174,142,0.4);
  background: rgba(15,174,142,0.07); border-radius: 14px;
  padding: 34px; text-align: center;
}
.form-success.visible { display: block; }
.success-icon { font-size: 34px; margin-bottom: 10px; }
.success-title { font-family: 'Space Grotesk', sans-serif; margin: 0 0 6px; }
.success-note { color: #9aa3b2; font-size: 14px; }
.elsewhere-card {
  border: 1px solid #1f2733; border-radius: 14px;
  padding: 24px; background: #0e121a;
}
.elsewhere-label {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #5a6677; margin-bottom: 16px;
}
.elsewhere-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #1a2230;
  color: #e8ebf0; font-size: 16px; transition: color .15s;
}
.elsewhere-link:last-child { border-bottom: none; }
.elsewhere-link:hover { color: var(--accent); }
.elsewhere-handle {
  color: #6b7585; font-family: 'JetBrains Mono', monospace; font-size: 13px;
}
.copy-email-btn {
  width: 100%; text-align: left; display: flex;
  justify-content: space-between; align-items: center;
  padding: 12px 0; color: #e8ebf0; font-size: 16px;
  transition: color .15s; cursor: pointer;
}
.copy-email-btn:hover { color: var(--accent); }

/* ---- footer ---- */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid #1b2230; margin-top: 40px;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 24px 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #5a6677;
}

/* ---- modal ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(5,7,12,0.74); backdrop-filter: blur(5px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  width: min(660px, 100%); max-height: 88vh; overflow: auto;
  background: #0e121a; border: 1px solid #232a36;
  border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.modal-thumb {
  height: 170px;
  background: repeating-linear-gradient(135deg,#141a25,#141a25 12px,#10141d 12px,#10141d 24px);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #1f2733; position: relative;
}
.modal-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.modal-thumb-label {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #4a5568;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid #2a3340; background: rgba(10,12,18,0.7);
  color: #c4ccd8; font-size: 16px; line-height: 1;
  transition: border-color .15s, color .15s; cursor: pointer;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-kind {
  position: absolute; top: 14px; left: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent);
  background: rgba(77,139,251,0.10); border: 1px solid rgba(77,139,251,0.25);
  padding: 3px 8px; border-radius: 6px;
}
.modal-content { padding: 26px 28px 30px; }
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 25px; font-weight: 600; margin: 0 0 18px; }
.modal-sections { display: flex; flex-direction: column; gap: 18px; }
.modal-section-label {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--accent); margin-bottom: 5px;
}
.modal-section-text { color: #aeb6c4; font-size: 15px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0; }
.modal-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: #8a93a3; background: #161b25; border: 1px solid #232a36;
  border-radius: 5px; padding: 5px 9px;
}
.modal-actions {
  display: flex; gap: 14px; border-top: 1px solid #1a2230; padding-top: 18px;
}

/* ---- cert modal ---- */
.cert-modal-box {
  width: min(560px, 100%); max-height: 90vh; overflow: auto;
}
.cert-modal-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding: 24px 24px 0;
}
.cert-modal-issuer {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--accent); margin-bottom: 6px;
}
.cert-modal-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 20px;
  font-weight: 600; margin: 0 0 6px; line-height: 1.3;
}
.cert-modal-year {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #6b7585;
}
.cert-modal-body { padding: 20px 24px 24px; }
.cert-modal-img-wrap {
  width: 100%; border-radius: 10px; overflow: hidden;
  background: #161b25; border: 1px solid #1f2733;
  margin-bottom: 18px; min-height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.cert-modal-img-wrap img {
  width: 100%; height: auto; display: block;
}
.cert-modal-img-wrap embed {
  width: 100%; height: 420px; display: block; border: none;
}
.cert-modal-img-wrap.empty {
  padding: 32px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #4a5568;
  text-align: center;
}
@media (max-width: 560px) {
  .cert-modal-img-wrap embed { height: 260px; }
}

/* ---- cert card click hint ---- */
.cert-view-hint {
  position: absolute; bottom: 12px; right: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #4a5568;
}
.cert-modal-actions { display: flex; gap: 12px; }

/* ---- back to top ---- */
#back-to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #aab3c2;
  background: rgba(14,18,26,0.85); border: 1px solid #232a36;
  backdrop-filter: blur(8px);
  transition: opacity .25s, transform .25s, border-color .15s, color .15s;
  opacity: 0; pointer-events: none; transform: translateY(10px);
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- responsive ---- */
@media (max-width: 760px) {
  .hero, .about-grid, .contact-grid { grid-template-columns: 1fr !important; }
  .hero { min-height: auto !important; padding: 40px 0 44px !important; gap: 36px !important; }
  .photo-wrap { order: -1; }
  .section { padding: 44px 0 !important; }
  .pad-x, .main-wrap { padding-left: 20px !important; padding-right: 20px !important; }
}
@media (max-width: 420px) {
  .form-row { grid-template-columns: 1fr !important; }
}
