/* Basic, modern styling */
:root {
  --bg: #020617;
  --card: #020617;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --primary: #22c55e; /* neon green */
  --primary-2: #06b6d4; /* cyan */
  --border: rgba(148, 163, 184, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(1100px 600px at 10% 0%, rgba(34, 197, 94, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(6, 182, 212, 0.18), transparent 55%),
    var(--bg);
  background-size: auto, auto, auto;
  background-position: 0 0, 0 0, 0 0;
  color: var(--text);
  line-height: 1.45;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-top: max(16px, env(safe-area-inset-top));
  border-bottom: 1px solid transparent;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 0 0 rgba(34, 197, 94, 0);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-header:hover::after {
  opacity: 0.6;
}

.logo a {
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 18px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: filter 0.3s ease;
}

.logo a:hover {
  filter: brightness(1.2);
}

.nav-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.admin-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.inline-form {
  margin: 0;
}

.page-content {
  width: min(1040px, 92vw);
  margin: 0 auto;
  padding: 28px 0 46px;
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
  flex: 1;
}

/* Home landing: 5×1 column of page buttons */
.home-landing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 0;
}

.home-nav-hint {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 0 auto 24px;
  max-width: 360px;
  line-height: 1.45;
}

.home-profile {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: rgba(18, 27, 46, 0.8);
}

.home-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center calc(50% + 10px);
  display: block;
}

.home-profile-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.home-name-heading {
  margin: 0 auto 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.home-tagline {
  margin: 0 auto 20px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.45;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(320px, 90vw);
}

.home-btn {
  display: block;
  text-align: center;
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 27, 46, 0.7);
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-btn:hover {
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.35);
}

.home-btn:active {
  transform: scale(0.98);
}

/* Social links under Get Into Contact (icons + hover tooltip) */
.home-social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.home-social-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 27, 46, 0.8);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.home-social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.15);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
}

.home-social-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.95);
  border: 1px solid var(--primary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.home-social-link:hover .home-social-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.home-social-icon {
  width: 24px;
  height: 24px;
  background-color: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.home-social-twitter { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E"); }
.home-social-linkedin { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E"); }
.home-social-email { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E"); }
.home-social-github { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); }
.home-social-gitlab { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M23.955 13.587l-1.342-4.135-2.664-8.189a.455.455 0 00-.867 0L16.418 9.45H7.582L4.919 1.263C4.783.84 4.403.596 4 .592a.455.455 0 00-.92.163L2.045 13.587a.656.656 0 00.241.655l9.256 6.514a.458.458 0 00.539 0l9.256-6.514a.656.656 0 00.241-.655z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M23.955 13.587l-1.342-4.135-2.664-8.189a.455.455 0 00-.867 0L16.418 9.45H7.582L4.919 1.263C4.783.84 4.403.596 4 .592a.455.455 0 00-.92.163L2.045 13.587a.656.656 0 00.241.655l9.256 6.514a.458.458 0 00.539 0l9.256-6.514a.656.656 0 00.241-.655z'/%3E%3C/svg%3E"); }

.hero {
  padding: 44px 0 18px;
}

.hero-text h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text p {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 16px;
}

/* Full-screen intro overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(34, 197, 94, 0.26), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(6, 182, 212, 0.26), transparent 60%),
    #020617;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-inner {
  text-align: center;
  max-width: 600px;
  padding: 24px;
}

.intro-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.intro-title {
  margin: 14px 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro-subtitle {
  margin: 0 0 12px;
  color: var(--muted);
}

.intro-hint {
  margin: 0;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

/* Front page & intro: mobile */
@media (max-width: 768px) {
  .intro-overlay {
    background:
      radial-gradient(80vmax 45vmax at 10% 0%, rgba(34, 197, 94, 0.26), transparent 55%),
      radial-gradient(80vmax 45vmax at 90% 10%, rgba(6, 182, 212, 0.26), transparent 55%),
      #020617;
  }
  .intro-inner {
    padding: 20px 16px;
    max-width: 100%;
  }
  .intro-title {
    font-size: clamp(22px, 6vw, 32px);
    margin: 12px 0 8px;
  }
  .intro-subtitle {
    font-size: 14px;
    line-height: 1.4;
  }
  .intro-hint {
    font-size: 12px;
  }
  .home-landing {
    min-height: 0;
    padding: 24px 16px 32px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
  /* Mobile order: photo, tagline, hint, buttons */
  .home-profile {
    order: 1;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
  }
  .home-name-heading {
    order: 2;
    font-size: 17px;
    margin-bottom: 6px;
  }
  .home-tagline {
    order: 3;
    font-size: 14px;
    margin-bottom: 16px;
    padding: 0 8px;
  }
  .home-nav-hint {
    order: 4;
    font-size: 12px;
    margin-bottom: 20px;
    padding: 0 8px;
  }
  .home-buttons {
    order: 5;
    width: 100%;
    max-width: 320px;
    gap: 12px;
  }
  .home-btn {
    padding: 16px 20px;
    font-size: 17px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 380px) {
  .intro-title {
    font-size: 20px;
  }
  .home-btn {
    padding: 14px 16px;
    font-size: 16px;
  }
}

/* Scroll reveal sections */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-cards {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.info-card {
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.95), rgba(18, 27, 46, 0.7));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.timeline {
  margin-top: 30px;
}

.timeline-items {
  border-left: 1px solid var(--border);
  margin-top: 12px;
  padding-left: 16px;
}

.timeline-item {
  position: relative;
  margin-bottom: 14px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-content h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
}

.skills-section {
  margin-top: 30px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  background: rgba(19, 27, 46, 0.9);
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.stat-card {
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.95), rgba(18, 27, 46, 0.7));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.stat-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--muted);
}

.stat-number {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.stat-label {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.feature-section {
  margin-top: 30px;
}

.feature-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(18, 27, 46, 0.9));
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 18px;
}

.feature-card h2 {
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.list-section {
  margin-top: 30px;
}

.bullet-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.contact-preview {
  margin-top: 30px;
}

.contact-preview-card {
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.95), rgba(18, 27, 46, 0.7));
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 18px;
}

.contact-preview-card h2 {
  margin: 0 0 8px;
}

.contact-preview-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.final-cta {
  margin-top: 30px;
  text-align: center;
}

.final-cta h2 {
  margin: 0 0 6px;
}

.final-cta p {
  margin: 0 0 10px;
  color: var(--muted);
}

.projects-section {
  margin-top: 34px;
}

.projects-section h2 {
  margin: 0 0 20px;
  font-size: 26px;
}

/* 3 columns; rows grow as more projects are added (1×3, 2×3, 3×3, …) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.project-card-link:hover .project-card {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.project-card {
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.95), rgba(18, 27, 46, 0.65));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card-title {
  margin: 0;
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 600;
  order: 1;
}

.project-card-thumb {
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.25);
  flex: 1;
  min-height: 0;
}

.project-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

.project-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Project detail page */
.project-detail {
  margin-top: 20px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary);
}

.project-detail-title {
  margin: 0 0 20px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.project-detail-banner {
  width: 100%;
  max-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 28px;
  background: rgba(0, 0, 0, 0.25);
}

.project-detail-banner img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.project-detail-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-detail-block h2 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
}

.project-detail-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

/* Legacy project card layout (used on index / elsewhere) */
.project-header h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.project-description {
  margin: 0 0 14px;
  color: var(--muted);
}

.project-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.project-media img,
.project-media video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.primary-btn {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #0b1220;
  font-weight: 700;
}

.secondary-btn {
  color: var(--muted);
}

.admin-btn {
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 18px 0;
  text-align: center;
  margin-top: auto;
  background: rgba(2, 6, 23, 0.9);
}

.auth-section,
.contact-section,
.companies-section,
.admin-section {
  padding: 26px 0;
}

.companies-section h2 {
  margin: 0 0 20px;
  font-size: 26px;
}

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

.company-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.company-card-link:hover .company-card {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.company-card {
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.95), rgba(18, 27, 46, 0.65));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.company-card-title {
  margin: 0;
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 600;
  order: 1;
}

.company-card-thumb {
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.25);
  flex: 1;
  min-height: 0;
}

.company-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

.company-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .companies-grid {
    grid-template-columns: 1fr;
  }
}

/* Company detail page */
.company-detail {
  margin-top: 20px;
}

.company-detail-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.company-detail-role,
.company-detail-period {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 17px;
}

.company-detail-banner {
  width: 100%;
  max-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 20px 0 28px;
  background: rgba(0, 0, 0, 0.25);
}

.company-detail-banner img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.company-detail-body {
  margin-top: 24px;
}

.company-detail-block h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.company-detail-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.auth-card,
.contact-card {
  width: min(640px, 92vw);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.95), rgba(18, 27, 46, 0.7));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.auth-card h1,
.contact-card h1 {
  margin: 0 0 10px;
}

.contact-page-socials {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-page-socials h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 10px 0 14px;
}

.form {
  display: grid;
  gap: 12px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

label {
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

textarea {
  resize: vertical;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  color: var(--muted);
}

.contact-list li {
  margin: 8px 0;
}

.contact-socials h2 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.contact-socials ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.admin-header h1 {
  margin: 0 0 6px;
}

.admin-header p {
  margin: 0 0 14px;
  color: var(--muted);
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  background: linear-gradient(180deg, rgba(18, 27, 46, 0.95), rgba(18, 27, 46, 0.72));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.full-width {
  grid-column: 1 / -1;
}

.panel-header p {
  margin: 0 0 12px;
  color: var(--muted);
}

.projects-admin-list {
  display: grid;
  gap: 12px;
}

.project-admin-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.project-admin-card legend {
  padding: 0 8px;
  color: var(--muted);
}

.social-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 10px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .social-row {
    grid-template-columns: 1fr;
  }
}

