/* ============================================================
   Yehia Al-Khalidi — Portfolio Stylesheet
   Glassmorphism + Bento Grid | CSS Variables | Responsive
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg-dark: #0f172a;
  --bg-darker: #080e1e;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-primary: #2dd4bf;
  /* Electric Teal */
  --accent-secondary: #fb923c;
  /* Sunset Orange */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* ---------- Canvas Background ---------- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Utility Classes ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.section {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  margin-bottom: 3rem;
  max-width: 560px;
}

.accent {
  color: var(--accent-primary);
}

.accent-orange {
  color: var(--accent-secondary);
}

/* ---------- Glass Card Utility ---------- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(45, 212, 191, 0.08);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.7rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

#logo span {
  color: var(--accent-primary);
}

#nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

#nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

#nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: width var(--transition);
}

#nav-links a:hover {
  color: #fff;
}

#nav-links a:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

#hero-content {
  max-width: 740px;
}

/* Avatar */
.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar .avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed var(--accent-primary);
  animation: spin-slow 12s linear infinite;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
}

.hero-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--bg-dark);
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-typing {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--accent-primary);
  font-weight: 500;
  min-height: 2rem;
  margin-bottom: 0.8rem;
}

.hero-typing .cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent-primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

.hero-summary {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: #5eead4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ---------- Stats ---------- */
#stats {
  position: relative;
  z-index: 1;
  padding: 0 0 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.stat-suffix {
  color: var(--accent-secondary);
  font-size: 0.7em;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.about-highlight {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-family: var(--font-heading);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.about-code-block {
  border-radius: var(--radius);
  padding: 2rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-muted);
  overflow: hidden;
}

.about-code-block .keyword {
  color: var(--accent-secondary);
}

.about-code-block .string {
  color: var(--accent-primary);
}

.about-code-block .comment {
  color: #475569;
  font-style: italic;
}

/* ---------- Skills (Bento) ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 1.8rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-primary), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}

.skill-card:hover::before {
  opacity: 0.06;
}

.skill-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.12);
}

.skill-card.large {
  grid-column: span 2;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  display: block;
}

.skill-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.skill-category-tag {
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-list-card {
  padding: 1.8rem 1.5rem;
}

.skill-list-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.skill-list-card ul {
  list-style: none;
}

.skill-list-card ul li {
  color: var(--text-muted);
  padding: 0.4rem 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list-card ul li::before {
  content: '▹';
  color: var(--accent-primary);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  background: var(--bg-dark);
  transform: translateX(-50%);
  left: -1rem;
  z-index: 2;
}

.timeline-item.volunteer .timeline-dot {
  border-color: var(--accent-secondary);
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
}

.badge-work {
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent-primary);
}

.badge-volunteer {
  background: rgba(251, 146, 60, 0.12);
  color: var(--accent-secondary);
}

.timeline-card {
  padding: 1.5rem;
}

.timeline-role {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.timeline-org {
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.timeline-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0.4rem 0;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---------- Contact / Footer ---------- */
#contact {
  border-top: 1px solid var(--glass-border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-detail .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-form {
  padding: 2rem;
}

.contact-form h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-primary);
  color: var(--bg-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.form-submit:hover {
  background: #5eead4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.25);
}

.social-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 3rem;
}

/* ---------- Scroll to Top ---------- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--bg-dark);
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.3);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: #5eead4;
  transform: translateY(-2px);
}

/* ---------- Animations ---------- */
@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Reveal on scroll — default hidden */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger>*:nth-child(1) {
  transition-delay: 0.05s;
}

.stagger>*:nth-child(2) {
  transition-delay: 0.1s;
}

.stagger>*:nth-child(3) {
  transition-delay: 0.15s;
}

.stagger>*:nth-child(4) {
  transition-delay: 0.2s;
}

.stagger>*:nth-child(5) {
  transition-delay: 0.25s;
}

.stagger>*:nth-child(6) {
  transition-delay: 0.3s;
}

.stagger>*:nth-child(7) {
  transition-delay: 0.35s;
}

.stagger>*:nth-child(8) {
  transition-delay: 0.4s;
}

.stagger>*:nth-child(9) {
  transition-delay: 0.45s;
}

.stagger>*:nth-child(10) {
  transition-delay: 0.5s;
}

/* ── Mobile: Polished & Professional ── */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  #nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transition: right var(--transition);
    border-left: 1px solid var(--glass-border);
  }

  #nav-links.open {
    right: 0;
  }

  #nav-links a {
    font-size: 1.1rem;
  }

  /* Sections — tighter vertical rhythm */
  .section {
    padding: clamp(3rem, 8vw, 5rem) 0;
  }

  /* Hero — centered, breathing room */
  #hero {
    min-height: 100svh;
    padding-top: 70px;
  }

  /* PERFORMANCE: disable expensive blur on mobile */
  #bg-canvas {
    display: none;
  }

  .glass-card,
  .navbar.scrolled,
  #nav-links {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .glass-card {
    background: rgba(15, 23, 50, 0.7);
  }

  .navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
  }

  #hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-avatar {
    width: 110px;
    height: 110px;
    margin-bottom: 1.5rem;
  }

  .hero-name {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    text-align: center;
  }

  .hero-typing {
    text-align: center;
  }

  .hero-summary {
    text-align: center;
    font-size: 0.92rem;
    padding: 0 0.5rem;
  }

  .hero-buttons {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
  }

  /* Stats — full-width stacked cards */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
  }

  .stat-value {
    font-size: 1.8rem;
    min-width: 80px;
  }

  .stat-label {
    margin-top: 0;
    font-size: 0.85rem;
  }

  /* About — single column, centered & polished */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-highlight {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
    text-align: center;
  }

  .about-text p {
    font-size: 0.9rem;
    max-width: 480px;
    text-align: center;
  }

  .about-code-block {
    font-size: 0.78rem;
    padding: 1.4rem;
    line-height: 1.7;
    text-align: left;
    width: 100%;
  }

  /* Section titles — left-aligned, compact */
  .section-title {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }

  .section-subtitle {
    font-size: 0.88rem;
    margin-bottom: 2rem;
  }

  /* Skills — 2-column grid, no oversized cards */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .skill-card {
    padding: 1.2rem 0.8rem;
  }

  .skill-card.large {
    grid-column: span 1;
  }

  .skill-icon {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }

  .skill-name {
    font-size: 0.88rem;
  }

  .skill-category-tag {
    font-size: 0.65rem;
  }

  .skill-list-card {
    grid-column: span 2;
    padding: 1.2rem;
  }

  .skill-list-card h3 {
    font-size: 1rem;
  }

  .skill-list-card ul li {
    font-size: 0.85rem;
    padding: 0.3rem 0;
  }

  /* Timeline — tighter, cleaner */
  .timeline {
    padding-left: 1.2rem;
  }

  .timeline-item {
    padding-left: 1.2rem;
    padding-bottom: 2rem;
  }

  .timeline-dot {
    width: 10px;
    height: 10px;
    left: -0.6rem;
  }

  .timeline-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
  }

  .timeline-card {
    padding: 1.2rem;
  }

  .timeline-role {
    font-size: 1rem;
  }

  .timeline-org {
    font-size: 0.82rem;
  }

  .timeline-date {
    font-size: 0.75rem;
  }

  .timeline-desc {
    font-size: 0.83rem;
    line-height: 1.6;
  }

  /* Contact — stacked, centered & polished */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-info h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    text-align: center;
  }

  .contact-info p {
    font-size: 0.9rem;
    max-width: 420px;
    text-align: center;
  }

  .contact-detail {
    font-size: 0.88rem;
    justify-content: center;
    width: 100%;
  }

  .social-links {
    justify-content: center;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .contact-form h3 {
    font-size: 1.05rem;
    text-align: center;
    margin-bottom: 1.2rem;
  }

  .form-group label {
    text-align: left;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .form-submit {
    padding: 0.9rem;
    font-size: 0.95rem;
  }

  /* Glass card — less aggressive hover on touch */
  .glass-card:hover {
    transform: none;
  }

  /* Scroll to top — smaller on mobile */
  .scroll-top {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    bottom: 1.2rem;
    right: 1.2rem;
  }

  /* Footer */
  .footer-bottom {
    font-size: 0.8rem;
    padding: 1.5rem 0;
  }
}

/* ── Tablet ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Desktop ── */
@media (min-width: 1025px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}