/* =============================================
   ENOCH UHUMUAVBI | BY TRUTH PORTFOLIO
   Theme: Refined Luxury — Black, White & Gold
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* === CSS VARIABLES === */
:root {
  --gold: #c9a84c;
  --gold-light: #e0c46a;
  --gold-dark: #9a7a2e;
  --gold-glow: rgba(201, 168, 76, 0.15);
  --black: #0a0a0a;
  --dark: #111111;
  --dark2: #1a1a1a;
  --dark3: #222222;
  --white: #f5f5f0;
  --grey: #888888;
  --grey-light: #cccccc;
  --text: #f5f5f0;
  --text-muted: #888888;
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --card-bg: #151515;
  --border: rgba(201, 168, 76, 0.2);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 40px rgba(201, 168, 76, 0.15);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-display: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --nav-height: 75px;
}

/* === LIGHT MODE === */
body.light-mode {
  --gold: #b8922a;
  --gold-light: #c9a84c;
  --gold-glow: rgba(184, 146, 42, 0.1);
  --text: #0a0a0a;
  --text-muted: #555555;
  --bg: #f8f8f4;
  --bg2: #ffffff;
  --bg3: #f0f0ec;
  --card-bg: #ffffff;
  --border: rgba(184, 146, 42, 0.25);
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-gold: 0 8px 40px rgba(184, 146, 42, 0.15);
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

::selection { background: var(--gold); color: #000; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* === UTILITY === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-pad { padding: 100px 0; }

.gold { color: var(--gold); }

.gold-line {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold-glow);
  transform: translateY(-2px);
}

/* === PRELOADER === */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner { text-align: center; }

.preloader-logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 4px;
  animation: pulse 1.5s infinite;
}

.preloader-bar {
  width: 200px;
  height: 2px;
  background: var(--dark3);
  margin: 1.5rem auto 0;
  border-radius: 2px;
  overflow: hidden;
}

.preloader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  animation: load 2s ease forwards;
  border-radius: 2px;
}

@keyframes load { from { width: 0; } to { width: 100%; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* === NAV === */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

body.light-mode #navbar.scrolled {
  background: rgba(248, 248, 244, 0.92);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  display: block;
  letter-spacing: 3px;
  font-weight: 400;
  margin-top: -4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.theme-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gold);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.theme-toggle:hover { border-color: var(--gold); background: var(--gold-glow); }

/* Hide "Hire Me" button on smaller screens to prevent nav overflow */
.nav-hire-btn {
  display: inline-flex;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === HERO === */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 3rem 0;
}

.hero-text { max-width: 600px; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-eyebrow-line {
  width: 40px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.hero-eyebrow span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.hero-name .line2 {
  display: block;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-typing {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--gold);
  animation: blink 0.8s infinite;
  flex-shrink: 0;
}

@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.hero-bio {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 460px;
  line-height: 1.8;
}

.hero-bio strong { color: var(--gold); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.social-link {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
  transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-avatar-wrap {
  position: relative;
  width: 380px;
  height: 380px;
}

.hero-avatar-ring {
  position: absolute;
  inset: -16px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  animation: spinSlow 20s linear infinite;
}

.hero-avatar-ring::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

@keyframes spinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  background: linear-gradient(135deg, var(--dark3), var(--dark2));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-avatar-placeholder {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.6;
}

.hero-badge {
  position: absolute;
  bottom: 20px;
  right: -10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-gold);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-badge-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero-badge-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

.hero-badge-text strong {
  font-size: 0.85rem;
  color: var(--text);
}

.hero-badge2 {
  position: absolute;
  top: 30px;
  left: -20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.hero-badge2 span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  animation: fadeUpDown 2s infinite;
}

.scroll-hint-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

@keyframes fadeUpDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.5; }
}

/* === ABOUT === */
#about { background: var(--bg2); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-img-wrap { position: relative; }

.about-img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-gold);
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--dark3), var(--dark2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-img-placeholder {
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--gold);
  opacity: 0.2;
}

.about-corner {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.3);
}

.about-corner .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.about-corner .label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.about-bio {
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 1.25rem;
}

.about-bio strong { color: var(--gold); }

.about-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.info-item .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.25rem;
}

.info-item .value {
  font-weight: 500;
  font-size: 0.9rem;
  word-break: break-word;
}

.about-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* === SKILLS === */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 5rem;
}

.skills-col-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skills-col-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skill-item { margin-bottom: 1.5rem; }

.skill-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
}

.skill-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === SERVICES === */
#services { background: var(--bg2); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 70px;
  height: 70px;
  background: var(--gold-glow);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1.5rem;
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-color: transparent;
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* === PROJECTS === */
.projects-filter {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 44px;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.project-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--dark3);
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img { transform: scale(1.05); }

.project-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--dark3), var(--dark2));
  color: var(--gold);
  opacity: 0.4;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.project-tag {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--gold-glow);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--gold);
  letter-spacing: 0.5px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.project-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: scale(0.92);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}

.modal-overlay.open .modal-box { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 1rem;
}

.modal-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.modal-close:hover { border-color: var(--gold); color: var(--gold); }

.modal-body {
  flex: 1;
  min-height: 0;
  height: calc(90vh - 72px);
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-muted);
}

.loader-ring {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === CONTACT === */
#contact { background: var(--bg2); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-list {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--gold-glow);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--gold);
}

.contact-info-text .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.15rem;
}

.contact-info-text .value {
  font-weight: 500;
  font-size: 0.9rem;
  word-break: break-word;
}

.contact-socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Form */
.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-top: 1rem;
  display: none;
}

.form-alert.success {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #28a745;
  display: block;
}

.form-alert.error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #dc3545;
  display: block;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  min-height: 52px;
}

/* === FOOTER === */
#footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
  margin-top: 1rem;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0;
}

.footer-links li a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy strong { color: var(--gold); }

/* === BACK TO TOP === */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.4);
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  z-index: 500;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5);
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* === DELAY UTILITIES === */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ===================================================
   RESPONSIVE BREAKPOINTS
   =================================================== */

/* --- 1100px: Hide "Hire Me" from nav to prevent overflow --- */
@media (max-width: 1100px) {
  .nav-links { gap: 1.5rem; }
  .nav-hire-btn { display: none; }
}

/* --- 1024px: Tighten hero & about grids --- */
@media (max-width: 1024px) {
  .hero-inner { gap: 2.5rem; }
  .hero-avatar-wrap { width: 300px; height: 300px; }
  .about-inner { gap: 3rem; }
  .skills-grid { gap: 2rem 3rem; }
  .contact-inner { gap: 2.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* --- 900px: Mobile nav triggers --- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
    z-index: 999;
  }

  body.light-mode .nav-links {
    background: rgba(248, 248, 244, 0.97);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .hamburger { display: flex; }
  .nav-hire-btn { display: none; }
}

/* --- 768px: Stack main layouts --- */
@media (max-width: 768px) {
  :root { --nav-height: 65px; }

  .container { padding: 0 1.5rem; }
  .section-pad { padding: 70px 0; }
  .section-header { margin-bottom: 3rem; }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
    padding: 2rem 0 3rem;
  }

  .hero-eyebrow { justify-content: center; }
  .hero-bio { margin: 0 auto 2.5rem; }
  .hero-cta { justify-content: center; }
  .hero-social { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-avatar-wrap { width: 220px; height: 220px; }
  .hero-badge { display: none; }
  .hero-badge2 { display: none; }

  /* About */
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img-wrap { max-width: 280px; margin: 0 auto; }
  .about-corner { bottom: -15px; right: -10px; padding: 1rem; }
  .about-corner .num { font-size: 2rem; }
  .about-info { grid-template-columns: 1fr 1fr; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Services */
  .services-grid { grid-template-columns: 1fr 1fr; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.75rem; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Modal */
  .modal-overlay { padding: 1rem; }
  .modal-body { height: calc(90vh - 65px); }
}

/* --- 600px: Refined tablet-small adjustments --- */
@media (max-width: 600px) {
  .section-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }

  .hero-name { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-typing { font-size: 0.9rem; }
  .hero-avatar-wrap { width: 190px; height: 190px; }

  .services-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .service-card { padding: 1.75rem 1.25rem; }
  .service-icon { width: 56px; height: 56px; font-size: 1.5rem; }

  .about-info { grid-template-columns: 1fr; }

  .project-links { flex-direction: column; }
  .project-links .btn { font-size: 0.85rem !important; }
}

/* --- 480px: Small phones --- */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-avatar-wrap { width: 170px; height: 170px; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 2rem 1.5rem; }

  .contact-form { padding: 1.25rem; }

  .preloader-logo { font-size: 1.8rem; }
  .preloader-bar { width: 160px; }

  #back-to-top { bottom: 1rem; right: 1rem; width: 44px; height: 44px; }
}

/* --- Touch device: remove hover transforms that feel sticky --- */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover,
  .project-card:hover,
  .btn-gold:hover,
  .btn-outline:hover,
  .social-link:hover { transform: none; }

  .project-overlay { opacity: 1; background: rgba(0, 0, 0, 0.55); }
}
