/* mobile.css (Max 768px) */
.main-content {
  padding: 0 5% 5.5rem;
}

.terms-page {
  padding-bottom: 5.5rem;
}

.hero-section {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 4rem 0;
}
.hero-image {
  margin-bottom: 2rem;
  order: 1;
}
.hero-image img {
  width: 80%;
  max-width: 300px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto;
  border-radius: 30px;
  box-shadow: 0 10px 0 var(--gold);
}
.hero-text {
  order: 2;
}
.hero-text h2 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  font-weight: 800;
}
.hero-text .subtitle {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
}
.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 auto 1.25rem;
  max-width: 34rem;
}
.social-links {
  margin-top: 2rem;
  justify-content: center;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  min-width: 130px;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(135deg, #1d2433 0%, #2d374d 100%);
  color: #fff;
  font-weight: 700;
}
.contact-button-secondary {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #fff;
  border: 1px solid rgba(88, 101, 242, 0.35);
}

/* NAVIGATION */
.main-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.logo {
  font-size: 1.05rem;
  line-height: 1.1;
}
.main-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.8rem;
}
.main-nav a {
  margin-left: 0;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* SKILLS */
.skills-section {
  padding: 4rem 0;
  text-align: center;
}
.skills-section h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
}
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.skill-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  text-align: center;
}

/* PORTFOLIO */
.portfolio-section {
  padding: 4rem 0;
  text-align: center;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  color: var(--text-color);
  text-transform: uppercase;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--gold);
}
.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.portfolio-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
}
.portfolio-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  object-position: center center;
}
.portfolio-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card-content {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}
.card-content .category {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #9b7a10;
}
.card-content h4 {
  font-size: 1.65rem;
  line-height: 1.2;
}
.card-content p {
  margin-top: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.project-cta {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 700;
  color: #1d2433;
}

.main-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  font-size: 0.72rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.main-footer span {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
}

body.mobile-ui-hidden .main-header {
  transform: translateY(-110%);
  opacity: 0;
}

body.mobile-ui-hidden .main-footer {
  transform: translateY(calc(100% + env(safe-area-inset-bottom)));
  opacity: 0;
}
