/* ========================================
   DAVID ASCENCIO · Personal Site
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Caveat:wght@400;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  --bg:          #0a0a0a;
  --bg-2:        #111111;
  --bg-card:     rgba(255,255,255,0.04);
  --text:        #f8f8f8;
  --muted:       rgba(248,248,248,0.55);
  --red:         #e63946;
  --gold:        #c9a84c;
  --blue:        #38bdf8;
  --border:      rgba(255,255,255,0.08);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --font-script: 'Caveat', cursive;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   NAV
   ======================================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10,10,10,0.7);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.nav-logo span {
  color: var(--red);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--red);
  color: #fff;
}

/* Hamburger — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 120;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-links-cta { display: none; }

/* ========================================
   HERO
   ======================================== */

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 2.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(230,57,70,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(201,168,76,0.06) 0%, transparent 50%),
    var(--bg);
  z-index: 0;
}

.hero-photo {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: 48%;
  z-index: 1;
  overflow: hidden;
}

.hero-photo img {
  object-position: top center;
}

.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, rgba(201,168,76,0.15) 0%, rgba(230,57,70,0.1) 50%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-placeholder span {
  font-family: var(--font-script);
  font-size: 1rem;
  color: var(--muted);
  transform: rotate(-8deg);
  text-align: center;
  line-height: 1.8;
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 35%),
              linear-gradient(to top, var(--bg) 0%, transparent 20%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-eyebrow {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 10vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  color: var(--red);
  display: block;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 2px;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.7); }
}

/* ========================================
   SECTION SHARED
   ======================================== */

section {
  padding: 7rem 2.5rem;
}

.section-label {
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text);
}

.section-title .red {
  color: var(--red);
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--red);
  margin: 1.5rem 0 3rem;
}

/* ========================================
   ABOUT
   ======================================== */

#about {
  background: var(--bg-2);
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-photo {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-card);
}

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(201,168,76,0.2) 0%, rgba(10,10,10,0) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.about-photo::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  opacity: 0.3;
  z-index: 0;
}

.about-photo img,
.about-photo-placeholder {
  position: relative;
  z-index: 1;
}

.about-photo-label {
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--gold);
}

.about-text p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text p strong {
  color: var(--text);
  font-weight: 600;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--red);
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  background: var(--bg-card);
}

/* ========================================
   EXPERIENCE / WORK
   ======================================== */

#work {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

#work > .section-label,
#work > .section-title,
#work > .divider {
  /* nothing special */
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.25s;
  cursor: default;
}

.work-card:hover {
  border-color: rgba(230,57,70,0.4);
  transform: translateY(-4px);
}

.work-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}

.work-card-img img {
  transition: transform 0.4s ease;
}

.work-card:hover .work-card-img img {
  transform: scale(1.04);
}

.work-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-card-placeholder.p-xtool {
  background: linear-gradient(135deg, #1a0a00, #2a0a0a);
}
.work-card-placeholder.p-tesla {
  background: linear-gradient(135deg, #0a0a1a, #0d1a10);
}
.work-card-placeholder.p-franchain {
  background: linear-gradient(135deg, #071414, #0a0a14);
}
.work-card-placeholder.p-enterprise {
  background: linear-gradient(135deg, #1a1000, #140800);
}
.work-card-placeholder.p-edu {
  background: linear-gradient(135deg, #100a1a, #0a0a14);
}
.work-card-placeholder.p-personal {
  background: linear-gradient(135deg, #0a1a0a, #0a1410);
}

.placeholder-logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  opacity: 0.25;
}

.work-card-body {
  padding: 1.5rem;
}

.work-card-company {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.work-card-role {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.work-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.work-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.work-card-date {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-card-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.25);
}

/* ========================================
   TIMELINE (Additional Experience)
   ======================================== */

#timeline {
  background: var(--bg-2);
}

.timeline-inner {
  max-width: 900px;
  margin: 0 auto;
}

.timeline-list {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--red);
  background: var(--bg-2);
}

.timeline-dot.gold {
  border-color: var(--gold);
}

.timeline-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.1;
}

.timeline-company {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 0.3rem;
}

.timeline-date {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 0.4rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
}

.timeline-highlights {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.highlight-pill {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: rgba(230,57,70,0.08);
  color: rgba(230,57,70,0.8);
  border: 1px solid rgba(230,57,70,0.2);
}

/* ========================================
   SKILLS / QUALIFICATIONS
   ======================================== */

#skills {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.skill-card:hover {
  border-color: rgba(201,168,76,0.35);
}

.skill-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.skill-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.skill-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}

.languages-section {
  margin-top: 4rem;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.lang-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
}

.lang-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.lang-level {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.3rem;
}

/* ========================================
   EDUCATION
   ======================================== */

#education {
  background: var(--bg-2);
}

.edu-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s;
}

.edu-card:hover {
  border-color: rgba(56,189,248,0.35);
}

.edu-school {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.1;
}

.edu-degree {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.05em;
}

.edu-date {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.edu-notes {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 0.5rem;
}

/* ========================================
   INTERESTS
   ======================================== */

.interests-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  overflow: hidden;
}

.interest-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.interest-icon {
  font-size: 2rem;
}

.interest-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.interest-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* ========================================
   CONTACT
   ======================================== */

#contact {
  position: relative;
  overflow: hidden;
  padding: 8rem 2.5rem;
  text-align: center;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(230,57,70,0.07) 0%, transparent 70%);
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.contact-eyebrow {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.contact-title .red { color: var(--red); }

.contact-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.2s, transform 0.2s;
}

.contact-link:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

.contact-link.email {
  background: var(--red);
  color: #fff;
}

.contact-link.phone {
  border: 1px solid var(--border);
  color: var(--text);
}

.contact-link.linkedin {
  border: 1px solid rgba(56,189,248,0.3);
  color: var(--blue);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  padding: 2rem 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ========================================
   NOISE TEXTURE
   ======================================== */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
}

/* ========================================
   VIDEO SECTION
   ======================================== */

#video-section {
  background: var(--bg-2);
}

.video-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 620px;
  object-fit: cover;
}

/* ========================================
   PHOTO GALLERY STRIP
   ======================================== */

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  height: 340px;
}

.gallery-item {
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: brightness(0.85);
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}

/* ========================================
   FADE-IN ANIMATION
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .languages-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  nav { padding: 0.9rem 1.25rem; }

  /* Desktop CTA + inline links give way to the hamburger menu */
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  /* Slide-down full-width menu panel */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 5.5rem 1.5rem 2rem;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  }
  nav.open .nav-links { transform: translateY(0); }

  .nav-links li {
    border-top: 1px solid var(--border);
  }
  .nav-links li:first-child { border-top: none; }
  .nav-links a {
    display: block;
    padding: 1rem 0.25rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
  }
  .nav-links a:active { color: var(--red); }

  /* In-menu "Get in touch" styled as a button */
  .nav-links-cta { display: block; margin-top: 1rem; border-top: none !important; }
  .nav-links-cta a {
    text-align: center;
    background: var(--red);
    color: #fff;
    border-radius: 3px;
    padding: 0.95rem;
    font-weight: 600;
  }

  /* Hamburger animates into an X when open */
  nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  section { padding: 4.5rem 1.5rem; }

  /* Hero: photo as an atmospheric top backdrop, text below */
  #hero { padding: 0 1.5rem 3.5rem; justify-content: flex-end; }
  .hero-photo {
    width: 100%;
    height: 55%;
    top: 0;
    bottom: auto;
    opacity: 0.5;
  }
  .hero-photo img { object-position: center 20%; }
  .hero-photo::after {
    background: linear-gradient(to bottom, rgba(10,10,10,0.35) 0%, var(--bg) 82%);
  }
  .hero-eyebrow { font-size: 1.2rem; }
  .hero-title { font-size: clamp(3.5rem, 15vw, 5.5rem); }
  .hero-sub { font-size: 0.98rem; margin-bottom: 2rem; }

  /* Full-width, tap-friendly hero buttons */
  .hero-actions { flex-direction: column; align-items: stretch; gap: 0.85rem; }
  .btn-primary { justify-content: center; padding: 1rem 2rem; font-size: 0.9rem; }
  .btn-ghost { justify-content: center; padding: 0.5rem; }
  .hero-scroll { display: none; }

  /* About: bring the headshot back on mobile, sized nicely */
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo {
    display: block;
    max-width: 300px;
    margin: 0 auto;
    aspect-ratio: 3/4;
  }
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  .stat-num { font-size: 2.2rem; }
  .stat-label { font-size: 0.68rem; }

  .work-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .skill-card { padding: 1.25rem; }
  .languages-grid { grid-template-columns: 1fr 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .gallery-strip { grid-template-columns: 1fr; height: auto; }
  .gallery-item { height: 240px; }

  /* Section titles scale down a touch for balance */
  .section-title { font-size: clamp(2.4rem, 9vw, 3.5rem); }

  /* Interests wrap onto multiple centered rows instead of being clipped */
  .interests-strip {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    overflow: visible;
    padding: 3rem 1.5rem;
  }
  .interest-label { font-size: 1.25rem; }
  .interest-icon { font-size: 1.5rem; }

  #contact { padding: 5.5rem 1.5rem; }

  /* Contact buttons: full-width, easy to tap, no overflow */
  .contact-links { flex-direction: column; align-items: stretch; }
  .contact-link {
    justify-content: center;
    width: 100%;
    word-break: break-word;
    font-size: 0.85rem;
    padding: 1rem 1.25rem;
  }

  footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* Extra-small phones: keep the email address from overflowing */
@media (max-width: 380px) {
  .contact-link.email { font-size: 0.74rem; letter-spacing: 0.02em; }
  .skills-grid { grid-template-columns: 1fr; }
}
