/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --c-bg:            #070a0f;
  --c-surface:       #0d1117;
  --c-surface2:      #111820;
  --c-border:        rgba(0,200,180,0.12);
  --c-border-strong: rgba(0,200,180,0.32);
  --c-accent:        #00c8b4;
  --c-accent2:       #7b61ff;
  --c-text:          #e8edf5;
  --c-muted:         #6b7a94;
  --c-nav:           rgba(7,10,15,0.97);
  --nav-h:           60px;
  --font-display:    'Syne', sans-serif;
  --font-mono:       'DM Mono', monospace;
  --font-body:       'DM Sans', sans-serif;
  --pad-x:           20px;
  --radius:          14px;
}

body.light {
  --c-bg:            #f0f4f8;
  --c-surface:       #ffffff;
  --c-surface2:      #e4eaf2;
  --c-border:        rgba(0,150,130,0.18);
  --c-border-strong: rgba(0,150,130,0.45);
  --c-accent:        #007d72;
  --c-accent2:       #5b41ef;
  --c-text:          #0f1923;
  --c-muted:         #5a6880;
  --c-nav:           rgba(240,244,248,0.97);
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
  -webkit-overflow-scrolling: touch;
}

img { max-width: 100%; display: block; }
a { -webkit-tap-highlight-color: transparent; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-h);
  background: var(--c-nav);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  z-index: 1000;
  transition: background 0.4s, box-shadow 0.3s;
  gap: 12px;
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.5); }

/* Avatar */
.nav-profile { display: flex; align-items: center; flex-shrink: 0; }
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid var(--c-accent);
}

/* Nav links */
.nav-menu {
  display: none;
  gap: 2px;
}
.nav-menu a {
  text-decoration: none;
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  min-height: 44px;
  display: flex; align-items: center;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--c-accent);
  background: rgba(0,200,180,0.08);
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Right: toggle */
.nav-right { display: flex; align-items: center; flex-shrink: 0; position: relative; z-index: 1001; }

/* ============================================
   MOBILE NAV DROPDOWN
   ============================================ */
.nav-menu.open {
  display: flex;
  position: fixed;
  top: var(--nav-h); left: 0;
  width: 100%;
  flex-direction: column;
  background: var(--c-nav);
  border-bottom: 1px solid var(--c-border);
  padding: 8px var(--pad-x) 16px;
  gap: 2px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideDown 0.2s ease;
  z-index: 999;
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   THEME SWITCH
   ============================================ */
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; z-index: 1001; cursor: pointer; }
.switch input { display: none; }
.switch-track {
  position: absolute; inset: 0;
  background: #1e2d3d;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--c-border);
  transition: 0.3s;
}
.switch-track::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  top: 2px; left: 2px;
  background: var(--c-muted);
  border-radius: 50%;
  transition: 0.3s;
}
.switch input:checked + .switch-track { background: rgba(0,200,180,0.2); border-color: var(--c-accent); }
.switch input:checked + .switch-track::after { transform: translateX(20px); background: var(--c-accent); }

/* ============================================
   MAIN
   ============================================ */
main { padding-top: var(--nav-h); }

/* ============================================
   HERO  — mobile first
   ============================================ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px var(--pad-x) 52px;
  gap: 36px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
  position: relative;
  overflow: hidden;
}

/* Grid bg */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,200,180,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,180,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
/* Glow */
.hero::after {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(0,200,180,0.1) 0%, transparent 70%);
  top: -60px; right: -60px;
  pointer-events: none;
}

/* Photo — top on mobile */
.hero-photo-wrap {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  order: -1;
}
.hero-photo-border {
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--c-accent), var(--c-accent2));
}
.hero-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 3px solid var(--c-bg);
}
body.light .hero-photo { border-color: var(--c-bg); }

.hero-photo-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 7px #22c55e;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.4);opacity:0.6} }

/* Text */
.hero-content { position: relative; z-index: 1; width: 100%; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-accent);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--c-accent);
}

/* =============================================
   HERO H1 — FULLY RESPONSIVE NAME FIX
   ============================================= */
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 14px;
  /* Use clamp so it never overflows on any screen */
  font-size: clamp(32px, 10vw, 72px);
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
body.light .hero h1 { color: var(--c-text); }
.hero h1 .accent { color: var(--c-accent); }

/* Extra-small phones (< 360px) */
@media (max-width: 359px) {
  .hero h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
  }
}

/* Small phones (360px – 479px) */
@media (min-width: 360px) and (max-width: 479px) {
  .hero h1 {
    font-size: clamp(32px, 9vw, 44px);
    letter-spacing: -0.5px;
  }
}

/* Medium phones (480px – 639px) */
@media (min-width: 480px) and (max-width: 639px) {
  .hero h1 {
    font-size: clamp(38px, 9vw, 52px);
  }
}

.hero-tagline {
  font-size: 16px;
  color: var(--c-muted);
  font-weight: 300;
  margin-bottom: 10px;
}
.typing-text { color: var(--c-accent); font-weight: 500; }
.cursor { display: inline-block; color: var(--c-accent); animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.75;
  font-weight: 300;
  margin-top: 8px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
  align-items: center;
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  width: 100%; max-width: 280px;
  background: var(--c-accent);
  color: #020e0d;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  min-height: 48px;
}
.btn-primary:hover { background: #00e5ce; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,200,180,0.3); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px;
  width: 100%; max-width: 280px;
  background: transparent;
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.5px;
  border-radius: 8px;
  border: 1px solid var(--c-border-strong);
  text-decoration: none;
  transition: all 0.2s;
  min-height: 48px;
}
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* ============================================
   SHARED SECTION
   ============================================ */
section {
  padding: 64px var(--pad-x);
  border-bottom: 1px solid var(--c-border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--c-accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--c-accent); opacity: 0.5;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 7vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--c-text);
  margin-bottom: 36px;
  line-height: 1.1;
}

/* ============================================
   ABOUT
   ============================================ */
#about { background: var(--c-surface); }

.about-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.about-photo-wrap {
  position: relative;
  width: 180px;
}
.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--c-accent), var(--c-accent2));
  z-index: 0;
  opacity: 0.55;
}
.about-photo {
  position: relative; z-index: 1;
  width: 180px; height: 210px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 13px;
}

.about-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.about-quick-tags span {
  padding: 6px 12px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
}

.about-right { display: flex; flex-direction: column; gap: 20px; }

.about-text {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.85;
  font-weight: 300;
}
.about-text strong { color: var(--c-accent); font-weight: 500; }

.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--c-surface2);
  border-radius: 10px;
  border: 1px solid var(--c-border);
  transition: border-color 0.2s;
  min-height: 52px;
}
.info-item:hover { border-color: var(--c-border-strong); }
.info-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: rgba(0,200,180,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.info-key {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--c-muted); margin-bottom: 2px;
}
.info-val { font-size: 13px; color: var(--c-text); font-weight: 500; word-break: break-word; }

/* ============================================
   SKILLS
   ============================================ */
#skills { background: var(--c-bg); }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
.skill-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 16px;
  position: relative; overflow: hidden;
  transition: all 0.25s;
}
.skill-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent2));
  opacity: 0; transition: opacity 0.3s;
}
.skill-card:hover { transform: translateY(-3px); border-color: var(--c-border-strong); }
.skill-card:hover::before { opacity: 1; }
.skill-card-icon { font-size: 22px; margin-bottom: 10px; display: block; }
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: 12px;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  padding: 4px 10px;
  background: rgba(0,200,180,0.07);
  border: 1px solid rgba(0,200,180,0.15);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--c-text);
}
/* ============================================
   CERTIFICATES
   ============================================ */
#certificate { background: var(--c-bg); }
.cert-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cert-card {
  display: block; text-decoration: none;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 22px 18px;
  transition: all 0.25s;
  position: relative; overflow: hidden;
  color: var(--c-text);
}
.cert-card::after {
  content: '↗';
  position: absolute; top: 16px; right: 18px;
  font-size: 16px; color: var(--c-muted);
  transition: all 0.2s;
}
.cert-card:hover { border-color: var(--c-accent2); }
.cert-card:hover::after { color: var(--c-accent2); transform: translate(2px,-2px); }
.cert-issuer {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--c-accent2); margin-bottom: 8px;
}
.cert-title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--c-text); margin-bottom: 6px;
  letter-spacing: -0.2px; padding-right: 24px;
}
.cert-sub { font-size: 13px; color: var(--c-muted); font-weight: 300; }

/* ============================================
   EDUCATION
   ============================================ */
#education { background: var(--c-surface); }
.edu-card {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--c-border-strong); }
.edu-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: rgba(37,99,235,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  border: 1px solid rgba(37,99,235,0.2);
}
.edu-degree {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700;
  letter-spacing: -0.5px; color: var(--c-text); margin-bottom: 4px;
}
.edu-school { font-size: 13px; color: var(--c-muted); margin-bottom: 12px; font-weight: 300; line-height: 1.5; }
.edu-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px; color: #6ea8fe;
}

/* ============================================
   CONTACT
   ============================================ */
#contact { background: var(--c-bg); }
.contact-intro {
  font-size: 14px; color: var(--c-muted);
  font-weight: 300; line-height: 1.75;
  margin-bottom: 28px;
}
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}
.contact-photo-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.contact-photo {
  width: 160px; height: 180px;
  object-fit: cover; object-position: center 15%;
  border-radius: var(--radius);
  border: 3px solid var(--c-border-strong);
  transition: border-color 0.3s;
}
.contact-photo:hover { border-color: var(--c-accent); }
.contact-photo-caption {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--c-muted); text-align: center;
}
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.contact-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  text-decoration: none; color: var(--c-text);
  transition: all 0.2s;
  min-height: 56px;
}
.contact-card:hover { border-color: var(--c-accent); }
.contact-card:hover .contact-icon { background: rgba(0,200,180,0.2); }
.contact-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(0,200,180,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  border: 1px solid var(--c-border);
  transition: background 0.2s;
}
.contact-key {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--c-muted); margin-bottom: 2px;
}
.contact-val { font-size: 13px; font-weight: 500; color: var(--c-text); word-break: break-all; }

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 18px var(--pad-x);
  background: #05070a;
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-text { font-family: var(--font-mono); font-size: 11px; color: var(--c-muted); }
.footer-stack { display: flex; gap: 7px; align-items: center; }
.stack-pill {
  padding: 3px 9px;
  background: rgba(0,200,180,0.07);
  border: 1px solid rgba(0,200,180,0.12);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--c-muted);
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   TABLET (min 640px)
   ============================================ */
@media (min-width: 640px) {
  :root { --pad-x: 36px; }

  .hero { padding: 56px var(--pad-x) 60px; }
  .hero-photo { width: 200px; height: 200px; }

  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
  .btn-primary, .btn-ghost {
    width: auto; max-width: none;
  }

  .about-layout { flex-direction: row; align-items: flex-start; gap: 36px; }
  .about-photo-col { flex-shrink: 0; }

  .cert-grid { grid-template-columns: 1fr 1fr; }
  .contact-layout { flex-direction: row; align-items: flex-start; }
  .contact-photo-wrap { flex-shrink: 0; }
  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .contact-full { grid-column: 1 / -1; }

  footer { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ============================================
   DESKTOP (min 900px)
   ============================================ */
@media (min-width: 900px) {
  :root {
    --nav-h: 68px;
    --pad-x: 60px;
  }

  /* Desktop navbar: show links inline, hide hamburger */
  .nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: transparent;
    border: none;
    padding: 0;
    animation: none;
    flex: 1;
    justify-content: center;
    max-height: none;
    overflow: visible;
  }
  .nav-hamburger { display: none !important; }

  /* Hero: side by side */
  .hero {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    padding: 0 var(--pad-x);
    gap: 60px;
  }
  .hero-photo-wrap { order: 0; flex-shrink: 0; }
  .hero-photo { width: 280px; height: 280px; }
  .hero-eyebrow { justify-content: flex-start; }
  .hero-buttons { justify-content: flex-start; }
  .hero-content { max-width: 520px; }

  /* Desktop h1 — single line fit */
  .hero h1 {
    font-size: clamp(42px, 4.5vw, 68px);
    letter-spacing: -1.5px;
    line-height: 1.05;
    word-break: normal;
    overflow-wrap: normal;
    white-space: nowrap;
  }

  section { padding: 96px var(--pad-x); }

  .about-layout { gap: 60px; }
  .about-photo { width: 210px; height: 250px; }
  .about-photo-wrap { width: 210px; }

  .skills-grid { grid-template-columns: repeat(4, 1fr); }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  footer { padding: 20px var(--pad-x); }
}


/* ============================================
   LARGE DESKTOP (min 1200px)
   ============================================ */
@media (min-width: 1200px) {
  :root { --pad-x: 80px; }
  .hero-photo { width: 320px; height: 320px; }
  .hero h1 { font-size: 64px; white-space: nowrap; }
}

/* ============================================
   iPhone SE LANDSCAPE (667 x 375)
   ============================================ */
@media (max-width: 667px) and (max-height: 375px) and (orientation: landscape) {

  :root { --nav-h: 50px; }

  /* Hero — side by side in landscape */
  .hero {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    gap: 20px;
    min-height: calc(100vh - var(--nav-h));
  }

  /* Photo — smaller */
  .hero-photo-wrap { order: 1; flex-shrink: 0; }
  .hero-photo { width: 100px; height: 100px; }
  .hero-photo-badge { font-size: 10px; padding: 5px 10px; }

  /* Text */
  .hero-content { order: 0; flex: 1; }
  .hero-eyebrow { font-size: 9px; margin-bottom: 6px; justify-content: flex-start; }

  .hero h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
    line-height: 1.0;
    margin-bottom: 6px;
    white-space: nowrap;
    word-break: normal;
  }

  .hero-tagline { font-size: 12px; margin-bottom: 4px; }
  .hero-desc { font-size: 11px; line-height: 1.5; margin-top: 4px; display: none; }

  .hero-buttons {
    flex-direction: row;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-start;
  }
  .btn-primary, .btn-ghost {
    padding: 8px 14px;
    font-size: 11px;
    min-height: 36px;
    width: auto;
  }

  /* Sections */
  section { padding: 28px 20px; }
  .section-title { font-size: 22px; margin-bottom: 20px; }

  /* About */
  .about-layout { flex-direction: row; gap: 20px; }
  .about-photo { width: 100px; height: 120px; }
  .about-photo-wrap { width: 100px; }
  .about-text { font-size: 12px; line-height: 1.6; }

  /* Skills grid — 4 columns */
  .skills-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
  .skill-card { padding: 12px 10px; }
  .skill-card-icon { font-size: 16px; margin-bottom: 6px; }
  .skill-card h3 { font-size: 9px; margin-bottom: 8px; }
  .pill { font-size: 9px; padding: 3px 7px; }

  /* Certs — 3 columns */
  .cert-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cert-card { padding: 14px 12px; }
  .cert-title { font-size: 13px; }

  /* Contact */
  .contact-layout { flex-direction: row; gap: 16px; }
  .contact-photo { width: 90px; height: 110px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  footer { flex-direction: row; justify-content: space-between; padding: 10px 20px; }
}

/* ============================================
   LANDSCAPE — all small phones (height <= 430px)
   ============================================ */
@media (orientation: landscape) and (max-height: 430px) {

  :root { --nav-h: 48px !important; }

  /* Hero — row layout, photo on right */
  .hero {
    flex-direction: row !important;
    text-align: left !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 24px !important;
    gap: 16px !important;
    min-height: calc(100vh - 48px) !important;
    overflow-y: auto !important;
  }

  /* Photo — right side, smaller */
  .hero-photo-wrap {
    order: 1 !important;
    flex-shrink: 0 !important;
  }
  .hero-photo {
    width: 90px !important;
    height: 90px !important;
  }
  .hero-photo-badge {
    font-size: 9px !important;
    padding: 4px 8px !important;
  }

  /* Text — left side */
  .hero-content {
    order: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .hero-eyebrow {
    font-size: 9px !important;
    margin-bottom: 4px !important;
    justify-content: flex-start !important;
  }

  /* THE MAIN FIX — naam ek line mein */
  .hero h1 {
    font-size: 22px !important;
    letter-spacing: -0.3px !important;
    line-height: 1.05 !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }

  .hero-tagline {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }

  /* Description hide karo — height kam hai */
  .hero-desc { display: none !important; }

  .hero-buttons {
    flex-direction: row !important;
    gap: 6px !important;
    margin-top: 8px !important;
    justify-content: flex-start !important;
  }
  .btn-primary, .btn-ghost {
    padding: 7px 12px !important;
    font-size: 10px !important;
    min-height: 32px !important;
    width: auto !important;
    max-width: none !important;
  }

  /* Sections — kam padding */
  section { padding: 24px 20px !important; }
  .section-title { font-size: 20px !important; margin-bottom: 16px !important; }

  /* About */
  .about-layout { flex-direction: row !important; gap: 16px !important; }
  .about-photo { width: 90px !important; height: 110px !important; }
  .about-photo-wrap { width: 90px !important; }
  .about-text { font-size: 12px !important; line-height: 1.5 !important; }

  /* Skills */
  .skills-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 8px !important; }
  .skill-card { padding: 10px 8px !important; }
  .skill-card-icon { font-size: 14px !important; margin-bottom: 4px !important; }
  .skill-card h3 { font-size: 8px !important; margin-bottom: 6px !important; }
  .pill { font-size: 9px !important; padding: 2px 6px !important; }

  /* Certs */
  .cert-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .cert-card { padding: 12px 10px !important; }
  .cert-title { font-size: 12px !important; }

  /* Contact */
  .contact-layout { flex-direction: row !important; gap: 14px !important; }
  .contact-photo { width: 80px !important; height: 100px !important; }
  .contact-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; }

  /* Footer */
  footer {
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 8px 20px !important;
  }
}
