:root{
  --bg: #0f1724;
  --card: #0b1220;
  --muted: #9aa7bf;
  --accent: #7c5cff;
  --glass: rgba(255,255,255,0.04);
  --glass-2: rgba(255,255,255,0.02);
  --radius: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg,#071022 0%, #081428 50%, #061224 100%);
  color:#e9f0ff;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
}

/* Layout */
.container{
  width:90%;
  max-width:1100px;
  margin:0 auto;
  padding:18px 0; /* reduced vertical padding to make header smaller overall */
}

/* Header */
.site-header{
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-bottom:1px solid rgba(255,255,255,0.03);
  padding:6px 0; /* reduce header height */
}
.header-inner{display:flex; align-items:center; justify-content:space-between; gap:12px}
.logo{margin:0; font-size:1.05rem; letter-spacing:0.4px; color:var(--accent)} /* slightly smaller */
.subtle{margin:0; font-size:.78rem; color:var(--muted)}
.nav a{color:var(--muted); text-decoration:none; margin-left:18px; font-size:.92rem; padding:8px 10px; border-radius:6px}
.nav a:hover{color:#fff; background: rgba(255,255,255,0.02);}

/* HERO: reduce top padding slightly so header + hero feel tighter */
.hero{padding:56px 0 64px; text-align:center;}
.title{font-size:2.1rem; margin:0 0 8px; letter-spacing:0.6px; transform: translateZ(0); text-shadow: 0 8px 36px rgba(124,92,255,0.12);}
.quote{margin:0; color:var(--muted); font-size:1.05rem;}

/* Grid of cards */
.grid-wrap{
  display:grid;
  grid-template-columns: 1fr;
  gap:20px;
  padding-bottom:48px;
}

/* Card styles with 3D look */
.card{
  perspective: 1200px;
}
.card-inner{
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(.2,.9,.2,1), box-shadow 0.25s;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  padding:18px;
  border-radius: var(--radius);
  box-shadow: 0 6px 30px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  transform: translateY(0) rotateX(0) rotateY(0);
  position: relative;
  overflow: hidden;
}
.card-inner::before{
  content:'';
  position:absolute;
  left:0; right:0; top:0; bottom:0;
  border-radius:inherit;
  pointer-events:none;
  box-shadow: 0 12px 60px rgba(124,92,255,0.06);
  mix-blend-mode: screen;
  z-index: -1;
}

/* Card content */
.card h3{margin-top:0; color:#ffffff; font-size:1.05rem}
.card p{color:var(--muted); margin:.6rem 0}
.card .meta{font-size:.86rem; color: #a9b6d0}
.skills{display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 0; padding:0; list-style:none}
.skills li{background:linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); padding:8px 12px; border-radius:999px; color:var(--muted); font-weight:600; font-size:.86rem; border:1px solid rgba(255,255,255,0.03)}

/* Items list */
.list{margin:0; padding-left:18px}
.list li{margin:.4rem 0; color:var(--muted)}

/* Button */
.btn{display:inline-block; padding:8px 14px; border-radius:999px; background:linear-gradient(90deg,var(--accent), #a17bff); color:#051029; text-decoration:none; font-weight:600}

/* Footer */
.site-footer{border-top:1px solid rgba(255,255,255,0.03); padding:14px 0; text-align:center; color:var(--muted); font-size:.92rem}

/* Hover lift */
.card:hover .card-inner{
  transform: translateY(-8px) rotateX(0) rotateY(0);
  box-shadow: 0 18px 70px rgba(2,6,23,0.75);
}

/* Responsive 2-column on larger screens */
@media(min-width:900px){
  .grid-wrap{grid-template-columns: repeat(2, 1fr);}
  .hero{padding:68px 0}
}
@media(min-width:1200px){
  .grid-wrap{grid-template-columns: repeat(3, 1fr);}
}

/* Profile image next to name (reduced size so header is less tall) */
.brand {
  display: flex;
  align-items: center;
  gap: 12px; /* space between image and text */
  margin-top: 2px;
}

.profile-img {
  width: 60px;           /* smaller */
  height: 60px;          /* smaller */
  border-radius: 50%;    /* perfectly round */
  object-fit: cover;     /* crops nicely */
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.28);
  flex-shrink: 0;
}

.text-block {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

/* HERO CANVAS */
.hero { position: relative; overflow: hidden; }
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

/* ensure hero-inner content sits above canvas */
.hero-inner {
  position: relative;
  z-index: 1;
}

/* Optional: soften hero text to pop above animation */
.title { transform: translateZ(0); }

/* Slight adjustments for small screens */
@media (max-width: 720px) {
  .container { padding: 14px 0; }
  .logo { font-size: 1rem; }
  .profile-img { width: 52px; height: 52px; }
  .nav a { margin-left: 10px; font-size: .88rem; padding: 6px 8px; }
  .hero { padding: 46px 0; }
  .quote { font-size: 0.98rem; }
}

/* === Click / touch highlight animation for target boxes === */
.focus-burst-target {
  transform-origin: center center;
  will-change: transform, box-shadow, filter;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease;
}

.focus-burst {
  animation: focusPulse 550ms cubic-bezier(.2,.9,.2,1), focusGlow 900ms ease-out;
  transform: translateZ(0) scale(1.02);
  box-shadow: 0 18px 60px rgba(124,92,255,0.18);
  z-index: 5;
}
.focus-burst .card-inner {
  transform: translateZ(18px) translateY(-6px) rotateX(0) rotateY(0);
}

@keyframes focusPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.04); }
  70%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes focusGlow {
  0%   { box-shadow: 0 0 0 rgba(124,92,255,0); filter: saturate(1); }
  40%  { box-shadow: 0 22px 80px rgba(124,92,255,0.22); filter: saturate(1.08); }
  100% { box-shadow: 0 12px 40px rgba(124,92,255,0.12); filter: saturate(1); }
}

/* Make touch feel immediate by giving smaller active scale for pointerdown */
[data-animate-temp="true"] {
  transform: translateZ(0) scale(0.997);
}

/* Add a subtle ring effect (optional) that fades out inside the target */
.focus-ring {
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%) scale(0.6);
  animation: ringPop 700ms cubic-bezier(.2,.9,.2,1);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.16);
}
@keyframes ringPop {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(0.6); }
  40% { opacity: .7; transform: translate(-50%, -50%) scale(1.02); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

.focus-burst-target { position: relative; overflow: visible; }

/* ===== About Swap (tiles -> detail) ===== */
.about-wrap {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  position: relative;
  overflow: visible;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  width: 48%;
}
.about-tile {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 16px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms;
  box-shadow: 0 6px 20px rgba(2,6,23,0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-tile h4 { margin: 0; color: #fff; font-size: 1rem; }
.about-tile p { margin: 0; color: var(--muted); font-size: .9rem; }
.about-tile:hover, .about-tile:focus {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(124,92,255,0.12);
  outline: none;
}
.about-detail {
  width: 52%;
  min-height: 150px;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 18px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 8px 36px rgba(2,6,23,0.55);
  transform: translateX(24px);
  transition: transform 420ms cubic-bezier(.2,.9,.2,1), opacity 280ms;
  opacity: 0.98;
  will-change: transform, opacity;
  overflow: auto;
}
.about-section:not(.show-detail) .about-detail {
  transform: translateX(24px) scale(0.98);
  opacity: 0.0;
  pointer-events: none;
}
.about-section.show-detail .about-grid {
  transform: translateX(-18%);
  opacity: 0.9;
  transition: transform 420ms cubic-bezier(.2,.9,.2,1), opacity 280ms;
}
.about-section.show-detail .about-detail {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.about-close {
  position: absolute;
  left: 12px;
  top: 12px;
  background: transparent;
  color: var(--muted);
  border: none;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.about-close:hover { color: #fff; background: rgba(255,255,255,0.02); }
.about-content h3 { margin-top: 6px; color: #fff; }
.about-content p { color: var(--muted); line-height: 1.6; }
@media (max-width: 880px) {
  .about-wrap { flex-direction: column; gap: 12px; }
  .about-grid, .about-detail { width: 100%; }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .about-section.show-detail .about-grid { transform: translateX(0); opacity: 1; }
}
@media (max-width: 480px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .about-tile { padding: 12px; border-radius: 10px; }
  .about-close { left: 8px; top: 8px; }
}

/* Style for skills description card */
#skills p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
  text-align: justify;
  margin-top: 10px;
}

/* Heading gradient style for h3 elements (standard + vendor prefixed) */
#skills h3,
#about h3,
#projects h3,
#achievements h3,
#links h3,
#contact h3 {
  color: #fff;
  font-size: 1.18rem;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-shadow: 0 0 10px rgba(124, 92, 255, 0.15);

  /* standard + vendor for gradient clipped text */
  background: linear-gradient(90deg, #7c5cff, #a58bff);
  background-clip: text;
  -webkit-background-clip: text;   /* keep for WebKit */
  -webkit-text-fill-color: transparent; /* transparent fill for WebKit */
  color: transparent; /* fallback so gradient shows where supported */

  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

#about h3:hover,
#projects h3:hover,
#skills h3:hover,
#achievements h3:hover,
#links h3:hover,
#contact h3:hover {
  transform: scale(1.03);
  text-shadow: 0 0 18px rgba(124, 92, 255, 0.35);
}

/* Unified paragraph styles: justify text and match Skills look */
#about p,
#projects p,
#skills p {
  text-align: justify;
  text-justify: inter-word;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.2px;
  margin-top: 10px;
  margin-bottom: 0;
  word-spacing: 1px;
}

/* Ensure card-inner columns align and headings are at top */
#about .card-inner,
#projects .card-inner,
#skills .card-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ===== Fix for large empty vertical space under cards ===== */
.grid-wrap,
.two-col-wrap {
  align-items: start;                /* align columns at top */
  grid-auto-rows: minmax(0, auto);  /* let rows size to content */
}

.card {
  min-height: 0;    /* override any earlier min-height forcing extra space */
  align-self: start;
}

.card-inner {
  max-height: none;
}

/* Reduce container bottom padding so footer sits closer to content */
.container {
  padding-bottom: 18px;
}

/* Footer should sit directly after content (not absolute) */
.site-footer {
  position: relative;
  margin-top: 0;
}

/* Small screens: keep sensible spacing */
@media (max-width: 880px) {
  .container { padding-bottom: 14px; }
}

/* Keep consistent spacing for those sections */
#achievements, #links, #contact {
  padding-top: 28px;
  padding-bottom: 28px;
}
/* keep inner spacing consistent for those cards */
#achievements .card-inner,
#links .card-inner,
#contact .card-inner {
  min-height: 200px;
  line-height: 1.7;
  text-align: justify;
}

/* ===== Links small inline description styling ===== */
#links .link-item {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
#links .link-item a {
  color: #a58bff;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
#links .link-item a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(124, 92, 255, 0.6);
}
#links .link-quote {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.3px;
}

/* ===== Uniform 3-column grid & equal card heights (responsive) ===== */
#main-grid, .grid-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
  grid-auto-rows: 1fr;
  width: 100%;
}
#main-grid .card,
.grid-wrap .card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
}
#main-grid .card-inner,
.grid-wrap .card-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px;
  box-sizing: border-box;
  height: 100%;
}
#main-grid .card-inner .btn { margin-top: auto; }
#main-grid .card-inner p,
#main-grid .card-inner ul {
  margin: 0 0 12px 0;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 1200px) {
  #main-grid, .grid-wrap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  #main-grid, .grid-wrap { grid-template-columns: 1fr; }
}

/* for reveal on scroll */
.animate-on-scroll { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* focus-burst visuals */
.focus-burst { transform: translateZ(0) scale(1.02); box-shadow: 0 18px 60px rgba(124,92,255,0.18); }
.focus-ring {
  position: absolute; pointer-events: none; border-radius: 999px;
  width: 10px; height: 10px; background: rgba(124,92,255,0.12);
  transform: translate(-50%, -50%); animation: ringPop 700ms cubic-bezier(.2,.9,.2,1) forwards;
}
@keyframes ringPop {
  0% { opacity: 0.9; transform: translate(-50%,-50%) scale(0.6); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.6); }
}
/* === Perfect Inline Link + Description Alignment === */
#links .card-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Use a grid so sentences align under the first word, not the link */
#links .link-item {
  display: grid;
  grid-template-columns: auto 1fr; /* left = link, right = text */
  column-gap: 10px;
  align-items: baseline;
  line-height: 1.7;
}

/* Gradient link styling */
#links .link-item a {
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  background: linear-gradient(90deg, #7c5cff, #a58bff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: text-shadow 0.3s ease, transform 0.15s ease;
  white-space: nowrap; /* keeps the link on one line */
}

/* Hover glow for links */
#links .link-item a:hover {
  text-shadow: 0 0 10px rgba(124, 92, 255, 0.6);
  transform: scale(1.03);
}

/* Sentence — properly aligned with link */
#links .link-quote {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
  word-break: break-word;
}

/* Responsive fallback */
@media (max-width: 600px) {
  #links .link-item {
    grid-template-columns: 1fr; /* stack for mobile */
    row-gap: 4px;
  }
  #links .link-item a {
    white-space: normal;
  }
}
#contact {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  
  margin-top: 0;  /* ↓ reduce this value to control top spacing */
}
/* === Contact Form Styling === */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  
  margin-top: 18px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: #e9f0ff;
  font-size: 0.95rem;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #a58bff;
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.3);
}

.send-btn {
  align-self: flex-start;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cff, #a58bff);
  color: #051029;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  
}

.send-btn:hover {
  background: linear-gradient(90deg, #8e6eff, #b49fff);
  transform: translateY(-2px);
}
#about .card-inner,
#projects .card-inner,
#skills .card-inner {
  height: 85%;
  min-height: 240px; /* adjust this number for your desired compactness */
}
/* === Make About / Projects / Skills match the height of the right-side cards ===
   - Only targets the three cards so it won't affect other sections.
   - Keeps content scrollable if it overflows on small screens.
   - Adjust --ROW_CARD_H to raise/lower the height as needed. */
:root {
  /* tweak this value to match your Certificates/Links/Resume card height */
  --ROW_CARD_H: 320px; /* try 320px / 360px / 400px depending on your desired size */
}

/* Apply a consistent fixed height to the three primary cards */
#about .card-inner,
#projects .card-inner,
#skills .card-inner {
  height: var(--ROW_CARD_H);
  min-height: var(--ROW_CARD_H);
  max-height: var(--ROW_CARD_H);
  box-sizing: border-box;   /* include padding inside height */
  overflow: auto;           /* allow scroll if content is too long */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* keeps heading at top */
}

/* Keep headings pinned at the top inside those cards */
#about .card-inner > h3,
#projects .card-inner > h3,
#skills .card-inner > h3 {
  margin-bottom: 12px;
  flex: 0 0 auto;
}

/* Let the paragraph area use remaining space and scroll if needed */
#about .card-inner > p,
#projects .card-inner > p,
#skills .card-inner > p {
  flex: 1 1 auto;
  overflow: auto;
  margin-bottom: 0;
}

/* Responsive tweak: reduce fixed height on small screens */
@media (max-width: 900px) {
  :root { --ROW_CARD_H: 250px; }
  #about .card-inner,
  #projects .card-inner,
  #skills .card-inner {
    height: var(--ROW_CARD_H);
    min-height: var(--ROW_CARD_H);
    max-height: var(--ROW_CARD_H);
  }
}

@media (max-width: 480px) {
  :root { --ROW_CARD_H: 160px; }
}
/* Reduce vertical spacing between the two card rows */
.grid-wrap,
#main-grid {
  row-gap:  05px;  /* ↓ reduces space between rows (try 20px–28px) */
  column-gap: 28px; /* keep horizontal spacing consistent */
}
/* === Navbar Profile Name & Subtitle Spacing === */
.text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 10px; /* space between image and text */
}

.text-block .logo {
  margin-bottom: 4px; /* <---- space between name and subtitle */
  line-height: 1.2;
}

.text-block .subtle {
  margin-top: 6px; /* optional, increases gap slightly more */
  font-size: 0.95rem;
  color: #b8c3e0;
}
.brand {
  display: flex;
  align-items: center; /* keeps image + text aligned nicely */
}
/* === Profile Image in Navbar (Scaled Without Affecting Navbar Height) === */
.profile-img {
  width: 68px;                /* keep original logical size */
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #7c5cff;
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.4);
  margin-right: 14px;
  transform: scale(1.35);     /* visually enlarge image */
  transform-origin: center;   /* center the zoom */
  transition: transform 0.3s ease;
}

/* Optional hover effect */
.profile-img:hover {
  transform: scale(1.4);
}
/* Fade + slide reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(.2, .6, .2, 1);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cursor glow effect */
.cursor-glow {
  position: fixed;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(124,92,255,0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: lighten;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* Smooth transition for tilt + lift */
.tilt, .hover-lift {
  transition: transform .3s ease, box-shadow .3s ease;
}
/* ========================= */
/* 📱 Landing + Navbar fixes */
/* ========================= */
@media (max-width: 768px) {
  /* ---- Navbar layout ---- */
  .site-header {
    padding: 10px 14px;
  }

  /* row that contains profile + nav links */
  .site-header .nav-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  /* container that holds the nav links (About, Projects, Designs, …) */
  .site-header .nav-links {
    display: flex;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 10px;
  }

  .site-header .nav-links a {
    font-size: 0.9rem;
    padding: 4px 6px;
  }

  /* ---- Landing hero / cards spacing ---- */
  .landing-main {
    padding: 16px 12px 40px;    /* less top/bottom padding on mobile */
  }

  /* every top-level section in the landing main */
  .landing-main > section {
    margin-top: 18px;           /* remove huge black gaps */
    margin-bottom: 18px;
  }

  /* card-like blocks inside landing page
     (use the class you use for your rounded cards here) */
  .landing-main .info-card,
  .landing-main .about-card,
  .landing-main .section-card {
    min-height: auto;           /* let height follow content */
    height: auto;
    margin: 0;
    padding: 16px 18px;
  }
}
/* ========================= */
/* 📱 Landing + Navbar fixes */
/* ========================= */
@media (max-width: 768px) {

  /* --- NAVBAR --- */
  .site-header {
    padding: 10px 12px;
  }

  .site-header .header-inner {
    display: flex;
    flex-wrap: wrap;           /* allow profile + nav to wrap */
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .site-header .brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .site-header .nav {
    display: flex;
    flex-wrap: wrap;           /* nav links go to next line if needed */
    row-gap: 4px;
    column-gap: 10px;
  }

  .site-header .nav a {
    font-size: 0.9rem;
    padding: 2px 4px;
  }

  /* --- LANDING PAGE SPACING --- */
  .landing-main {
    padding: 0 12px 40px;
  }

  .landing-main .hero {
    padding: 20px 0 12px;      /* less bottom gap below hero */
  }

  /* space between cards but no huge black blocks */
  .landing-main #main-grid {
    margin-top: 8px;
    gap: 16px;
  }

  .landing-main .card {
    margin: 0;
    min-height: auto;          /* let cards shrink to content */
    height: auto;
  }
}
/* ================================
   📱 Fix home cards on mobile only
   Make About / Projects / Skills
   behave like Certificates / Links / Resume
   ================================ */
@media (max-width: 768px) {

  /* Stack all cards with equal spacing */
  .landing-main #main-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;              /* same vertical gap for all cards */
  }

  /* Remove any fixed height for top cards */
  .landing-main #main-grid .card,
  .landing-main #main-grid .card.small-card {
    min-height: 0;
    height: auto;
  }

  /* Remove inner scroll and let content grow like Certificates/Links */
  .landing-main #main-grid .card-inner {
    max-height: none;
    overflow: visible;
  }

  /* Slightly reduce padding so content breathes nicely on mobile */
  .landing-main #main-grid .card .card-inner {
    padding: 16px 18px;
  }
}
/* ==========================================
   📱 FINAL FIX — Remove scrolling text on cards
   ========================================== */
@media (max-width: 768px) {

  /* Apply only to the first row cards */
  #about .card-inner,
  #projects .card-inner,
  #skills .card-inner {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }

  /* Make sure the card wrapper also grows naturally */
  #about,
  #projects,
  #skills {
    height: auto !important;
    min-height: auto !important;
  }

  /* Keep spacing consistent with lower cards */
  #about .card-inner,
  #projects .card-inner,
  #skills .card-inner {
    padding: 18px 20px;
  }
}
