/* ==========================================================================
   Yartesh Patel — Portfolio
   Design tokens
   ========================================================================== */

:root{
  --bg: #08090D;
  --bg-elevated: #101219;
  --bg-card: rgba(255,255,255,0.035);
  --bg-card-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);
  --text: #ECEDF2;
  --text-muted: #9599AB;
  --text-dim: #5E6377;

  --blue: #5B8DEF;
  --violet: #8E7CF5;
  --cyan: #33D6E8;

  --grad-accent: linear-gradient(120deg, var(--blue), var(--violet) 55%, var(--cyan));

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --container: 1180px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 76px;
}

[data-theme="light"]{
  --bg: #F5F5F7;
  --bg-elevated: #FFFFFF;
  --bg-card: rgba(10,11,15,0.03);
  --bg-card-hover: rgba(10,11,15,0.055);
  --border: rgba(10,11,15,0.09);
  --border-strong: rgba(10,11,15,0.16);
  --text: #14161C;
  --text-muted: #565B6B;
  --text-dim: #8B8FA0;
}

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

html{
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

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

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

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

::selection{ background: var(--violet); color:#fff; }

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

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ==========================================================================
   Texture / ambient layers
   ========================================================================== */

.grain{
  position: fixed; inset:0; pointer-events:none; z-index: 2;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow{
  position: fixed; top:0; left:0; width: 420px; height: 420px;
  border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(91,141,239,0.10), transparent 70%);
  transform: translate(-50%,-50%);
  transition: opacity .3s ease;
  opacity: 0;
}
@media (hover: hover){ .cursor-glow.active{ opacity: 1; } }

.scroll-progress{
  position: fixed; top:0; left:0; height: 2px; width:0%;
  background: var(--grad-accent);
  z-index: 999;
  transition: width .1s linear;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar{
  position: fixed; top: 0; left:0; right:0; z-index: 100;
  padding: 18px 24px;
}

.nav-inner{
  max-width: var(--container);
  margin: 0 auto;
  display:flex; align-items:center; justify-content: space-between;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease), padding .3s var(--ease);
}

.navbar.scrolled .nav-inner{
  background: rgba(16,18,25,0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-color: var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
[data-theme="light"] .navbar.scrolled .nav-inner{
  background: rgba(255,255,255,0.7);
}

.nav-logo{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.nav-links{
  display:flex; gap: 4px;
}

.nav-link{
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .25s ease;
}
.nav-link:hover{ color: var(--text); }
.nav-link.active{ color: var(--text); }
.nav-link.active::after{
  content:"";
  position:absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
}

.nav-actions{ display:flex; align-items:center; gap: 10px; }

.theme-toggle{
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  display:flex; align-items:center; justify-content:center;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.theme-toggle:hover{ background: var(--bg-card-hover); transform: translateY(-1px); }
.theme-toggle svg{ width: 17px; height: 17px; }
.theme-toggle .icon-moon{ display:none; }
[data-theme="light"] .theme-toggle .icon-sun{ display:none; }
[data-theme="light"] .theme-toggle .icon-moon{ display:block; }

.hamburger{
  display:none;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  flex-direction: column; align-items:center; justify-content:center; gap: 4px;
}
.hamburger span{
  width: 15px; height: 1.5px; background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.hamburger.open span:nth-child(1){ transform: translateY(5.5px) rotate(45deg); }
.hamburger.open span:nth-child(2){ opacity: 0; }
.hamburger.open span:nth-child(3){ transform: translateY(-5.5px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero{
  position: relative;
  min-height: 100vh;
  display:flex; align-items:center;
  padding: calc(var(--nav-h) + 24px) 24px 60px;
  overflow: hidden;
}

.hero-bg{ position: absolute; inset:0; z-index: -1; }
#heroCanvas{ position:absolute; inset:0; width:100%; height:100%; }

.hero-grid{
  position: absolute; inset:0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 10%, transparent 75%);
  opacity: .5;
}

.hero-inner{
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.hero-label{
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 22px;
}
.hero-label .dot{ color: var(--cyan); margin: 0 2px; }

.hero-heading{
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  line-height: 1.05;
  margin-bottom: 14px;
}
.hero-name{
  background: var(--grad-accent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-subheading{
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.rotating-wrap{
  display: inline-block;
  color: var(--text);
  border-bottom: 2px solid var(--violet);
  padding-bottom: 2px;
}

.hero-desc{
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-bottom: 32px;
}

.hero-actions{ display:flex; gap: 14px; margin-bottom: 34px; flex-wrap: wrap; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s ease, border-color .25s ease;
}
.btn-primary{
  background: var(--grad-accent);
  color: #06070A;
  font-weight: 600;
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px rgba(91,141,239,0.28); }
.btn-ghost{
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover{ background: var(--bg-card-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.btn-full{ width: 100%; }

.hero-socials{ display:flex; gap: 12px; }
.social-icon{
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display:flex; align-items:center; justify-content:center;
  color: var(--text-muted);
  transition: color .25s ease, border-color .25s ease, transform .25s ease, background .25s ease;
}
.social-icon svg{ width: 17px; height: 17px; }
.social-icon:hover{ color: var(--text); border-color: var(--border-strong); transform: translateY(-3px); background: var(--bg-card-hover); }

.hero-image-wrap{ position: relative; justify-self: center; }

.hero-image-frame{
  position: relative;
  width: min(360px, 80vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  padding: 6px;
  background: var(--grad-accent);
  animation: float 6s ease-in-out infinite;
}
.hero-image{
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elevated);
}
.frame-ring{
  position: absolute; inset: -14px;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  animation: spin 40s linear infinite;
}
.hero-image-glow{
  position: absolute; inset: 10%;
  z-index: -1;
  background: radial-gradient(circle, rgba(142,124,245,0.35), transparent 70%);
  filter: blur(30px);
}

@keyframes float{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-14px);} }
@keyframes spin{ to{ transform: rotate(360deg); } }

.scroll-cue{
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 38px; border-radius: 14px;
  border: 1.5px solid var(--border-strong);
  display:flex; justify-content:center; padding-top: 7px;
}
.scroll-cue span{
  width: 4px; height: 8px; border-radius: 2px; background: var(--text-muted);
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue{ 0%{ opacity:1; transform: translateY(0);} 70%{ opacity:0; transform: translateY(10px);} 100%{opacity:0;} }

/* reveal-on-scroll (single orchestrated hero sequence + section reveals) */
.reveal{ opacity: 0; transform: translateY(16px); }
.reveal.in{ animation: revealUp .7s var(--ease) forwards; }
@keyframes revealUp{ to{ opacity:1; transform: translateY(0); } }

/* ==========================================================================
   Sections (shared)
   ========================================================================== */

.section{ padding: 120px 24px; position: relative; }
.section-inner{ max-width: var(--container); margin: 0 auto; }

.section-head{ margin-bottom: 56px; max-width: 640px; }
.section-tag{
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue);
  margin: 0 0 10px;
}
.section-title{
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}
.section-desc{ color: var(--text-muted); margin-top: 14px; max-width: 480px; }

/* ==========================================================================
   About
   ========================================================================== */

.about-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-copy p{ color: var(--text-muted); margin: 0 0 18px; max-width: 46ch; }
.about-copy p:last-child{ margin-bottom: 0; }

.about-cards{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.info-card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 22px;
  transition: transform .3s var(--ease), border-color .3s ease, background .3s ease;
}
.info-card:hover{ transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.info-card-icon{
  display:inline-flex; width: 38px; height: 38px; border-radius: 10px;
  align-items:center; justify-content:center;
  background: rgba(91,141,239,0.12); color: var(--blue); margin-bottom: 14px;
}
.info-card-icon svg{ width: 18px; height: 18px; }
.info-card h3{ font-size: 0.95rem; margin-bottom: 4px; }
.info-card p{ color: var(--text-muted); font-size: 0.9rem; margin:0; }

/* ==========================================================================
   Skills
   ========================================================================== */

.skills-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 60px;
}

.skill-card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px;
  transition: transform .3s var(--ease), border-color .3s ease, background .3s ease;
}
.skill-card:hover{ transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.skill-card h3{ font-size: 1rem; margin-bottom: 16px; }
.skill-tags{ display:flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span{
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color .2s ease, border-color .2s ease;
}
.skill-card:hover .skill-tags span{ color: var(--text); }

.hardware-strip{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, rgba(91,141,239,0.07), rgba(142,124,245,0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 44px;
}
.hardware-copy h3{ font-size: 1.5rem; margin-bottom: 12px; }
.hardware-copy p{ color: var(--text-muted); max-width: 42ch; }

.hardware-visual{ display:flex; align-items:center; justify-content:center; gap: 18px; }
.hw-node{
  display:flex; flex-direction: column; align-items:center; gap: 10px;
  padding: 20px 18px; border-radius: var(--radius-m);
  background: var(--bg-elevated); border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted); text-align:center; min-width: 110px;
}
.hw-node svg{ width: 26px; height: 26px; color: var(--cyan); }
.hw-connector{ flex:1; max-width: 60px; height: 2px; background: var(--border); position: relative; }
.hw-pulse{
  position:absolute; top:-2px; left:0; width: 8px; height: 6px; border-radius: 3px;
  background: var(--grad-accent);
  animation: pulseMove 2.4s ease-in-out infinite;
}
@keyframes pulseMove{ 0%{ left:0; opacity:0;} 15%{opacity:1;} 85%{opacity:1;} 100%{ left: calc(100% - 8px); opacity:0;} }

/* ==========================================================================
   Projects
   ========================================================================== */

.projects-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.project-card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s ease, box-shadow .4s ease;
  display:flex; flex-direction: column;
}
.project-card:hover{
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 50px rgba(0,0,0,0.35);
}

.project-visual{
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, rgba(91,141,239,0.14), rgba(142,124,245,0.10));
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.pv-scan{ position:absolute; left:0; right:0; height: 2px; top: 20%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: scanMove 3.2s ease-in-out infinite; }
@keyframes scanMove{ 0%,100%{ top: 15%; opacity:.3;} 50%{ top: 80%; opacity: .9;} }

.pv-lines{ position:absolute; inset: 0; background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 22px); }

.pv-radar{ position:absolute; width: 140px; height: 140px; border-radius: 50%; border: 1px solid var(--border-strong); top: 50%; left: 50%; transform: translate(-50%,-50%); }
.pv-radar::before{ content:""; position:absolute; inset: 20px; border-radius: 50%; border: 1px solid var(--border); }
.pv-radar::after{ content:""; position:absolute; top:50%; left:50%; width: 50%; height: 1.5px; background: var(--cyan); transform-origin: left center; animation: radarSpin 3s linear infinite; }
@keyframes radarSpin{ to{ transform: rotate(360deg); } }

.pv-grid{ position:absolute; inset:0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 18px 18px; }

.project-card:hover .project-visual{ transform: scale(1.02); }
.project-visual{ transition: transform .4s var(--ease); }

.project-body{ padding: 26px 26px 28px; display:flex; flex-direction:column; gap: 12px; flex:1; }
.project-category{ font-family: var(--font-mono); font-size: 0.74rem; color: var(--violet); }
.project-body h3{ font-size: 1.15rem; }
.project-desc{ color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.project-tags{ display:flex; flex-wrap: wrap; gap: 8px; }
.project-tags span{
  font-size: 0.76rem; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted);
}

.project-features{
  display:grid; grid-template-columns: 1fr 1fr; gap: 6px 14px;
  font-size: 0.84rem; color: var(--text-muted);
  max-height: 0; opacity: 0; overflow:hidden;
  transition: max-height .4s var(--ease), opacity .3s ease;
}
.project-card:hover .project-features{ max-height: 120px; opacity: 1; }
.project-features li{ position: relative; padding-left: 14px; }
.project-features li::before{ content:"→"; position:absolute; left:0; color: var(--cyan); }

.project-links{ display:flex; gap: 10px; margin-top: auto; padding-top: 6px; }
.project-btn{
  display:inline-flex; align-items:center; gap: 6px;
  font-size: 0.86rem; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text);
  transition: background .25s ease, border-color .25s ease;
}
.project-btn:hover{ background: var(--bg-card-hover); }
.project-btn .arrow{ transition: transform .25s var(--ease); }
.project-btn:hover .arrow{ transform: translateX(3px); }
.project-btn.ghost{ border-style: dashed; color: var(--text-muted); }

/* ==========================================================================
   Journey timeline
   ========================================================================== */

.timeline{ position: relative; padding-left: 40px; }
.timeline-line{
  position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1.5px;
  background: linear-gradient(var(--blue), var(--violet), var(--cyan));
  opacity: .5;
}
.timeline-item{ position: relative; padding-bottom: 44px; }
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-dot{
  position: absolute; left: -40px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--blue);
}
.timeline-present .timeline-dot{ background: var(--grad-accent); border-color: transparent; box-shadow: 0 0 0 4px rgba(91,141,239,0.15); }
.timeline-period{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan); }
.timeline-content h3{ font-size: 1.1rem; margin: 6px 0 6px; }
.timeline-content p{ color: var(--text-muted); margin: 0; max-width: 50ch; }

/* ==========================================================================
   Certificates
   ========================================================================== */

.cert-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cert-card{
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 26px;
  transition: transform .3s var(--ease), border-color .3s ease;
}
.cert-card:hover{ transform: translateY(-4px); border-color: var(--border-strong); }
.cert-org{ font-family: var(--font-mono); font-size: 0.76rem; color: var(--blue); }
.cert-card h3{ font-size: 1.05rem; margin: 10px 0 8px; }
.cert-card p{ color: var(--text-muted); font-size: 0.88rem; margin: 0 0 18px; }
.cert-btn{
  font-size: 0.84rem; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  transition: background .25s ease;
}
.cert-btn:hover{ background: var(--bg-card-hover); }

/* ==========================================================================
   Coding / LeetCode
   ========================================================================== */

.coding-grid{ display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items:center; }
.coding-focus{ font-family: var(--font-mono); color: var(--text); font-size: 0.95rem; margin-bottom: 14px; }
.coding-focus .dot{ color: var(--cyan); margin: 0 4px; }
.coding-copy p:not(.coding-focus){ color: var(--text-muted); max-width: 46ch; }

.leetcode-card{
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-l); padding: 32px;
  text-align:center;
}
.leetcode-icon{
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 16px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(142,124,245,0.12); color: var(--violet);
}
.leetcode-icon svg{ width: 24px; height: 24px; }
.leetcode-card h3{ font-size: 1.1rem; margin-bottom: 4px; }
.leetcode-card p{ color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 20px; }

/* ==========================================================================
   GitHub
   ========================================================================== */

.github-card{
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-l); padding: 34px 38px;
  display:flex; align-items:center; justify-content:space-between; gap: 24px;
  flex-wrap: wrap;
}
.github-left{ display:flex; align-items:center; gap: 20px; }
.github-icon{
  width: 52px; height: 52px; border-radius: 14px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background: rgba(91,141,239,0.12); color: var(--blue);
}
.github-icon svg{ width: 26px; height: 26px; }
.github-left h3{ font-size: 1.1rem; margin-bottom: 4px; }
.github-left p{ color: var(--text-muted); font-size: 0.9rem; max-width: 40ch; margin:0; }

/* ==========================================================================
   Currently learning
   ========================================================================== */

.learning-grid{ display:flex; flex-wrap: wrap; gap: 12px; }
.learning-chip{
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 0.88rem; color: var(--text-muted);
  transition: transform .25s var(--ease), border-color .25s ease, color .25s ease;
}
.learning-chip:hover{ transform: translateY(-3px); border-color: var(--border-strong); color: var(--text); }
.rocket{ display:inline-block; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid{ display:grid; grid-template-columns: 0.8fr 1.2fr; gap: 50px; }
.contact-info{ display:flex; flex-direction:column; gap: 4px; }
.contact-row{
  display:flex; align-items:center; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--border);
  color: var(--text-muted); transition: color .25s ease, padding-left .25s ease;
}
.contact-row svg{ width: 18px; height: 18px; flex-shrink:0; }
.contact-row:hover{ color: var(--text); padding-left: 8px; }

.contact-form{ display:flex; flex-direction: column; gap: 18px; }
.form-field{ display:flex; flex-direction: column; gap: 8px; }
.form-field label{ font-size: 0.85rem; color: var(--text-muted); }
.form-field input, .form-field textarea{
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-s); padding: 13px 16px;
  color: var(--text); font-family: inherit; font-size: 0.95rem;
  transition: border-color .25s ease, background .25s ease;
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus{
  outline: none; border-color: var(--blue); background: var(--bg-card-hover);
}
.form-field.error input, .form-field.error textarea{ border-color: #E5675E; }
.field-error{ font-size: 0.78rem; color: #E5675E; min-height: 1em; }
.form-note{ font-size: 0.86rem; color: var(--cyan); margin: 0; min-height: 1em; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer{ border-top: 1px solid var(--border); padding: 50px 24px 40px; }
.footer-inner{
  max-width: var(--container); margin: 0 auto;
  display:flex; align-items:center; justify-content:space-between; flex-wrap: wrap; gap: 20px;
}
.footer-brand{ display:flex; flex-direction: column; gap: 4px; }
.footer-logo{ font-family: var(--font-display); font-weight: 700; letter-spacing: 0.04em; }
.footer-tagline{ font-size: 0.85rem; color: var(--text-dim); }
.footer-socials{ display:flex; gap: 10px; }
.footer-copy{ font-size: 0.82rem; color: var(--text-dim); margin:0; width: 100%; text-align:center; order: 3; padding-top: 20px; border-top: 1px solid var(--border); }

/* ==========================================================================
   Back to top
   ========================================================================== */

.back-to-top{
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  color: var(--text); display:flex; align-items:center; justify-content:center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}
.back-to-top.visible{ opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg{ width: 18px; height: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; text-align:center; }
  .hero-desc{ margin-left:auto; margin-right:auto; }
  .hero-actions, .hero-socials{ justify-content:center; }
  .hero-image-wrap{ order: -1; margin-top: 20px; }

  .about-grid{ grid-template-columns: 1fr; gap: 36px; }
  .skills-grid{ grid-template-columns: repeat(2, 1fr); }
  .hardware-strip{ grid-template-columns: 1fr; text-align:center; }
  .hardware-visual{ margin-top: 10px; }
  .projects-grid{ grid-template-columns: 1fr; }
  .cert-grid{ grid-template-columns: 1fr; }
  .coding-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .github-card{ justify-content:center; text-align:center; }
  .github-left{ flex-direction: column; }
}

@media (max-width: 720px){
  .nav-links{
    position: fixed; top: calc(var(--nav-h) + 6px); left: 16px; right: 16px;
    flex-direction: column; gap: 4px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-m); padding: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    transform: translateY(-12px) scale(.98); opacity: 0; visibility: hidden;
    transition: all .3s var(--ease);
  }
  .nav-links.open{ transform: translateY(0) scale(1); opacity: 1; visibility: visible; }
  .nav-link{ padding: 12px 16px; }
  .hamburger{ display:flex; }

  .skills-grid{ grid-template-columns: 1fr; }
  .about-cards{ grid-template-columns: 1fr; }
  .footer-inner{ flex-direction: column; text-align:center; }
}

@media (max-width: 480px){
  .section{ padding: 90px 18px; }
  .hero{ padding-left: 18px; padding-right: 18px; }
}
