/* ============================================================
   style.css — Ahmed heersare Portfolio
   ============================================================ */

/* ── Reset & Variables ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:        #111111;
  --white:        #ffffff;
  --off-white:    #f4f4f2;
  --mid-grey:     #888888;
  --light-grey:   #e8e8e6;
  --accent-teal:  #5ac8b0;
  --accent-red:   #e05050;
  --accent-yellow:#e8c84a;
  --accent-pink:  #e8a0a0;
  --nav-height:   64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

/* ============================================================
   NAV
   ============================================================ */
/* Reset and General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar Container */
.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #000000; /* Solid black background */
    color: #ffffff;
    height: 70px;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Logo Styling */
.nav-logo {
    display: flex;
    align-items: center;
    height: 100%;
    border-right: 1px solid #333; /* Vertical line separator */
    padding-right: 20px;
}

.logo-circle {
    width: 45px;
    height: 45px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: -1px;
}

/* Navigation Links Styling */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Centers the links perfectly */
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

/* Styling for specific colored links if needed (like "blog" in your image) */
.nav-links li:nth-child(4) a {
    color: #ffd700; /* Gold color for the blog link */
}

.nav-links a:hover {
    color: #aaaaaa;
}

/* Social Icons Styling */
.nav-socials {
    display: flex;
    gap: 20px;
}

.nav-socials a {
    color: #ffffff;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
}

.nav-socials a:hover {
    opacity: 0.7;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* In a full project, you would add a hamburger menu here */
    }
    
    .navbar {
        padding: 0 20px;
    }
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-left {
  padding: 60px 0px 60px 200px;
  animation: fadeSlideUp 0.9s ease both;
}

.hero-right {
  padding: 60px 80px 60px 60px;
  text-align: right;
  animation: fadeSlideUp 0.9s 0.15s ease both;
}

.hero-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-bottom: 10px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(52px, 6vw, 88px);
  font-weight: 900;
  line-height: 1.0;
  color: var(--black);
  margin-bottom: 18px;
}

.hero-right .hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 64px);
}

.hero-subtitle {
  font-size: 15px;
  color: #666;
  line-height: 1.65;
  max-width: 260px;
}

.hero-right .hero-subtitle { margin-left: auto; }

.hero-center-img {
  width: clamp(580px, 48vw, 1040px);
  bottom: 20%;
  position: relative;
  align-self: flex-end;
  animation: fadeIn 1.1s 0.3s ease both;
}

.hero-center-img img {
  width: 80%;
  display: block;
  object-fit: cover;
}

.code-ghost {
  position: absolute;
  right: 500px;
  bottom: 200px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.08);
  line-height: 1.9;
  pointer-events: none;
  animation: fadeIn 1.5s 0.6s ease both;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  padding: 100px 80px;
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  border-top: 1px solid var(--light-grey);
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 14px;
}

.about-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 5vw, 80px);
  font-weight: 900;
  line-height: 1.0;
  margin-bottom: 24px;
}

.about-lead {
  font-size: 18px;
  font-weight: 300;
  color: #555;
  line-height: 1.6;
  margin-bottom: 16px;
}

.about-body {
  font-size: 15px;
  color: #777;
  line-height: 1.75;
}

.about-portrait {
  width: 80%;
  margin-left: auto;
  display: block;
  border-radius: 4px;
}

.about-photo-strip {
  display: flex;
  gap: 10px;
  margin-top: 40px;
  overflow: hidden;
}

.photo-thumb {
  flex: 1;
  aspect-ratio: 1;
  background: var(--light-grey);
  border-radius: 12px;
  overflow: hidden;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.photo-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   PART DESIGNER / CODER
   ============================================================ */
#part-coder {
  background: var(--off-white);
  padding: 100px 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 60px;
  align-items: center;
  border-top: 1px solid var(--light-grey);
}

.part-column h3 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--black);
}

.part-column ul {
  list-style: none;
}

.part-column ul li {
  font-size: 15px;
  color: #666;
  padding: 7px 0;
  border-bottom: 1px solid #e0e0de;
}
.part-column ul li:last-child { border-bottom: none; }

.part-column--right { text-align: right; }

.pie-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pie-chart {
  width: 220px;
  height: 220px;
}

/* ============================================================
   SKILLS
   ============================================================ */
#skills {
  padding: 100px 80px;
  background: var(--white);
  border-top: 1px solid var(--light-grey);
}

.skills-header {
  text-align: right;
  margin-bottom: 60px;
}

.skills-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 700;
}

.skills-chart {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  height: 360px;
}

.y-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-bottom: 40px;
  padding-right: 12px;
  align-items: flex-end;
  flex-shrink: 0;
}

.y-labels span {
  font-size: 12px;
  color: #aaa;
}

.skill-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
}

.skill-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
}

.skill-bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  cursor: default;
  transition: opacity 0.2s;
  animation: growBar 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.skill-bar:hover { opacity: 0.85; }

.skill-bar-label { text-align: center; color: white; }

.skill-bar-label .pct {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.skill-bar-label .pct sup { font-size: 16px; }

.skill-bar-label .name {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

/* ============================================================
   LEARN
   ============================================================ */
#learn {
  padding: 100px 80px;
  background: var(--off-white);
  border-top: 1px solid var(--light-grey);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.learn-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-bottom: 10px;
}

.learn-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(52px, 5vw, 80px);
  font-weight: 900;
  line-height: 1.0;
  margin-bottom: 24px;
}

.learn-lead {
  font-size: 18px;
  font-weight: 300;
  color: #555;
  line-height: 1.6;
  margin-bottom: 16px;
}

.learn-body {
  font-size: 15px;
  color: #777;
  line-height: 1.75;
}

.book-mockup {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
#portfolio {
  padding: 100px 80px;
  background: var(--off-white);
  border-top: 1px solid var(--light-grey);
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 60px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light-grey);
}

.section-divider span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.card-preview {
  height: 200px;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-preview--white {
  background: var(--white);
  align-items: flex-start;
  padding: 20px;
}

/* Figma card internals */
.card-figma {
  padding: 20px;
  width: 100%;
  height: 100%;
}

.status-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.status-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-pill.approved { color: #3a9c6e; background: #e6f7ef; }
.status-pill.pending  { color: #c07a10; background: #fef6e4; }
.status-pill.rejected { color: #c04040; background: #fdecea; }

.notification {
  background: white;
  border-radius: 8px;
  border: 1px solid #e8f4ed;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.notification-icon {
  width: 18px;
  height: 18px;
  background: #3a9c6e;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-icon svg { width: 10px; height: 10px; fill: white; }

.notif-text strong { font-size: 13px; display: block; }
.notif-text span   { font-size: 11px; color: #888; }

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

.form-radio {
  width: 16px;
  height: 16px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  flex-shrink: 0;
}

.form-check {
  width: 16px;
  height: 16px;
  background: #3a6cf6;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-check svg { width: 10px; height: 10px; fill: white; }

.form-label { font-size: 12px; color: #555; }

.form-tag {
  font-size: 11px;
  background: #eee;
  border-radius: 4px;
  padding: 2px 8px;
  color: #666;
  margin-left: auto;
}

/* Book card */
.card-book-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sports card */
.card-sports { width: 100%; }

.sports-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.sport-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.sports-title { font-size: 14px; font-weight: 600; }
.sports-meta  { font-size: 11px; color: #888; margin-top: 2px; }

.sports-teams {
  display: flex;
  gap: 8px;
}

.team-box {
  flex: 1;
  border-radius: 10px;
  border: 1px solid #eee;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.team-logo--canberra { background: linear-gradient(135deg, #5ac8b0, #3aaa90); }
.team-logo--south    { background: linear-gradient(135deg, #e05050, #c03030); }

.team-name { font-size: 13px; font-weight: 600; }
.team-odds { font-size: 14px; font-weight: 700; color: #3a6cf6; }

/* Card info footer */
.card-info { padding: 20px; }

.card-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-info span { font-size: 12px; color: var(--mid-grey); }

/* Back to top */
.back-top {
  display: flex;
  justify-content: center;
  padding: 48px 0 0;
}

.back-top a {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--light-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid-grey);
  text-decoration: none;
  transition: all 0.2s;
}

.back-top a:hover {
  border-color: var(--black);
  color: var(--black);
  transform: translateY(-3px);
}

.back-top svg { width: 18px; height: 18px; }

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  padding: 100px 80px;
  background: var(--white);
  border-top: 1px solid var(--light-grey);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(52px, 5vw, 80px);
  font-weight: 900;
  line-height: 1.0;
  margin-bottom: 20px;
}

.contact-sub {
  font-size: 16px;
  color: #666;
  line-height: 1.65;
  margin-bottom: 40px;
}

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

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--light-grey);
  transition: all 0.2s ease;
  color: inherit;
}

.social-link:hover {
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-icon svg { width: 18px; height: 18px; fill: white; }

.social-icon--twitter   { background: #1da1f2; }
.social-icon--facebook  { background: #1877f2; }
.social-icon--linkedin  { background: #0a66c2; }
.social-icon--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

.social-name { font-size: 15px; font-weight: 500; }

.contact-portrait {
  display: flex;
  justify-content: center;
}

.contact-portrait img {
  width: 80%;
  max-width: 400px;
  display: block;
}

/* ============================================================
   EMAIL FORM
   ============================================================ */
#email-form {
  padding: 80px;
  background: var(--off-white);
  border-top: 1px solid var(--light-grey);
}

.email-form-inner { max-width: 900px; }

.email-form-inner h3 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 32px;
}

.form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.form-fields-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--light-grey);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  background: white;
  transition: border-color 0.2s;
  resize: none;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--black);
}

.form-group textarea { height: 160px; }

.form-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-send {
  background: var(--black);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-send:hover {
  background: #333;
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--off-white);
  border-top: 1px solid var(--light-grey);
  padding: 28px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copy { font-size: 13px; color: var(--mid-grey); }

footer nav a {
  font-size: 13px;
  color: var(--mid-grey);
  text-decoration: none;
  margin-left: 28px;
  transition: color 0.2s;
}
footer nav a:hover { color: var(--black); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes growBar {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}


/* Hamburger — hidden on desktop, shown via mobile media query */
.nav-hamburger { display: none; }
.nav-mobile-socials { display: none; }

/* ============================================================
   RESPONSIVE — TABLET  (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {

  /* Nav */
  .nav-links { gap: 24px; padding: 0 24px; }
  .nav-links a { font-size: 14px; }
  .nav-socials { gap: 16px; padding: 0 20px; }

  /* Hero */
  #hero {
    grid-template-columns: 1fr auto 1fr;
  }
  .hero-left  { padding: 48px 32px 48px 48px; }
  .hero-right { padding: 48px 48px 48px 32px; }
  .hero-center-img { width: clamp(220px, 26vw, 340px); }
  .code-ghost { display: none; }

  /* About */
  #about { padding: 80px 48px; gap: 48px; }

  /* Part designer / coder */
  #part-coder { padding: 80px 48px; gap: 40px; }
  .pie-chart  { width: 180px; height: 180px; }

  /* Skills */
  #skills { padding: 80px 48px; }
  .skills-chart { height: 300px; }
  .skill-bar-label .pct { font-size: 22px; }

  /* Learn */
  #learn { padding: 80px 48px; gap: 48px; }

  /* Portfolio */
  #portfolio { padding: 80px 48px; }

  /* Contact */
  #contact { padding: 80px 48px; gap: 48px; }

  /* Email form */
  #email-form { padding: 60px 48px; }

  /* Footer */
  footer { padding: 24px 48px; }
}

/* ============================================================
   RESPONSIVE — MOBILE  (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {

  :root { --nav-height: 56px; }

  /* ── Nav ── */
  nav {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--nav-height);
    align-items: center;
    position: fixed;
  }

  .nav-logo-wrap {
    width: 64px;
    height: var(--nav-height);
    border-right: 1px solid rgba(255,255,255,0.12);
  }

  /* Hide desktop links & socials by default on mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    width: 100%;
    background: #1c1c1c;
    border-top: 1px solid rgba(255,255,255,0.08);
    order: 10; /* push below the bar */
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-socials {
    display: none;  /* shown inside mobile menu instead */
  }

  /* Mobile social row inside the open menu */
  .nav-mobile-socials {
    display: flex;
    gap: 20px;
    padding: 16px 24px 20px;
  }

  .nav-mobile-socials a {
    color: rgba(255,255,255,0.7);
    display: flex;
    transition: color 0.2s;
  }
  .nav-mobile-socials a:hover { color: white; }
  .nav-mobile-socials svg { width: 20px; height: 20px; fill: currentColor; }

  /* Hamburger button */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 20px;
    height: var(--nav-height);
    margin-left: auto;
  }

  .nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* Animate to X when open */
  .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); }

  /* ── Hero ── */
  #hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: calc(var(--nav-height) + 40px) 24px 0;
    min-height: auto;
    gap: 32px;
  }

  .hero-left,
  .hero-right {
    padding: 0;
    text-align: center;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-right .hero-subtitle { margin-left: 0; }
  .hero-subtitle { max-width: 100%; }

  .hero-center-img {
    width: clamp(200px, 70vw, 320px);
    order: -1;
    animation: none;
    opacity: 1;
  }

  .hero-right .hero-title { font-size: clamp(28px, 8vw, 48px); }
  .hero-title              { font-size: clamp(36px, 10vw, 60px); }

  .code-ghost { display: none; }

  /* ── About ── */
  #about {
    grid-template-columns: 1fr;
    padding: 64px 24px;
    gap: 40px;
  }

  .about-portrait {
    width: 60%;
    margin: 0 auto;
  }

  .about-photo-strip { gap: 6px; }

  /* ── Part designer / coder ── */
  #part-coder {
    grid-template-columns: 1fr;
    padding: 64px 24px;
    gap: 40px;
    text-align: center;
  }

  .part-column--right { text-align: center; }

  .pie-wrapper { order: -1; }
  .pie-chart   { width: 160px; height: 160px; }

  /* ── Skills ── */
  #skills { padding: 64px 24px; }

  .skills-header { text-align: center; }
  .skills-header h2 { font-size: 28px; }

  .skills-chart {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  /* Hide vertical y-axis labels on mobile — replaced by inline % */
  .y-labels { display: none; }

  .skill-col {
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .skill-bar-wrap {
    flex: 1;
    height: 48px;
    justify-content: flex-start;
    align-items: stretch;
  }

  .skill-bar {
    height: 100% !important;
    width: 100%;
    border-radius: 8px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    animation: growBarH 1s cubic-bezier(0.34,1.56,0.64,1) both;
  }

  .skill-bar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
  }

  .skill-bar-label .pct {
    font-size: 18px;
    white-space: nowrap;
  }

  .skill-bar-label .name {
    font-size: 13px;
    margin-top: 0;
    text-align: left;
  }

  /* ── Learn ── */
  #learn {
    grid-template-columns: 1fr;
    padding: 64px 24px;
    gap: 40px;
  }

  .learn-heading { font-size: clamp(40px, 12vw, 64px); }

  /* ── Portfolio ── */
  #portfolio { padding: 64px 24px; }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* ── Contact ── */
  #contact {
    grid-template-columns: 1fr;
    padding: 64px 24px;
    gap: 40px;
  }

  .contact-portrait { display: none; } /* hide portrait on mobile to save space */

  .social-grid { grid-template-columns: 1fr; }

  /* ── Email form ── */
  #email-form { padding: 48px 24px; }

  .form-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-submit { justify-content: stretch; }
  .btn-send    { width: 100%; }

  /* ── Footer ── */
  footer {
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    text-align: center;
  }

  footer nav a { margin-left: 0; margin: 0 10px; }
  footer nav   { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }

  /* Disable reveal animations on mobile for snappier feel */
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE  (max-width: 400px)
   ============================================================ */
@media (max-width: 400px) {

  .hero-title              { font-size: 36px; }
  .hero-right .hero-title  { font-size: 28px; }
  .about-heading           { font-size: 40px; }
  .learn-heading           { font-size: 40px; }
  .contact-heading         { font-size: 40px; }

  .portfolio-grid { gap: 16px; }

  #part-coder { padding: 48px 16px; }
  #skills     { padding: 48px 16px; }
  #learn      { padding: 48px 16px; }
  #portfolio  { padding: 48px 16px; }
  #contact    { padding: 48px 16px; }
  #email-form { padding: 40px 16px; }
  #about      { padding: 48px 16px; }
  footer      { padding: 20px 16px; }
}

/* Horizontal bar grow animation for mobile skills */
@keyframes growBarH {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}
