/* === Password Gate === */
#gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg, #0d0d12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#gate.hidden {
  display: none;
}

.gate-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.gate-logo {
  font-size: 22px;
  font-weight: 700;
  color: #a855f7;
  letter-spacing: 0.05em;
  margin-bottom: 32px;
}

.gate-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #f0eeff;
  margin-bottom: 8px;
}

.gate-hint {
  font-size: 14px;
  color: rgba(240, 238, 255, 0.45);
  margin-bottom: 28px;
}

.gate-input-wrap {
  display: flex;
  gap: 10px;
}

#gate-input {
  flex: 1;
  background: #16131f;
  border: 1px solid rgba(240, 238, 255, 0.1);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #f0eeff;
  outline: none;
  transition: border-color 0.2s;
}

#gate-input:focus {
  border-color: #a855f7;
}

#gate-input.shake {
  animation: shake 0.35s ease;
  border-color: #f87171;
}

#gate-btn {
  background: #a855f7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
}

#gate-btn:hover {
  opacity: 0.85;
}

.gate-error {
  margin-top: 12px;
  font-size: 13px;
  color: #f87171;
  opacity: 0;
  transition: opacity 0.2s;
}

.gate-error.visible {
  opacity: 1;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* === Variables === */
:root {
  --bg: #0d0d12;
  --surface: #16131f;
  --surface-2: #1e1a2e;
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --text: #f0eeff;
  --muted: rgba(240, 238, 255, 0.5);
  --border: rgba(240, 238, 255, 0.07);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* === Layout === */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px;
}

/* === Navigation === */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.05em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 68px 48px 0;
  max-width: 1160px;
  margin: 0 auto;
}

.hero-content {
  max-width: 800px;
}

.hero-greeting {
  font-size: 17px;
  font-weight: 500;
  color: var(--purple);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.hero-name {
  font-size: clamp(52px, 7.8vw, 108px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  color: var(--text);
}

.hero-subtitle {
  font-size: 19px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 44px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
  border: 1.5px solid var(--purple);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(240, 238, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
}

/* === About === */
.about {
  padding: 130px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 700;
  margin-bottom: 30px;
  letter-spacing: -0.02em;
}

.about-text p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 18px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.photo-placeholder {
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(240, 238, 255, 0.2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
}

.photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  display: block;
}

/* === Work === */
.work {
  padding: 130px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.25);
}

.project-image {
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(240, 238, 255, 0.2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.project-info {
  padding: 24px 28px 28px;
}

.project-category {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
}

.project-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.project-info p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 8px;
}

.project-link-note {
  font-size: 12px !important;
  color: rgba(168, 85, 247, 0.6) !important;
  margin-top: 12px !important;
}

/* === Contact === */
.contact {
  padding: 130px 0;
  text-align: center;
}

.contact h2 {
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact-subtitle {
  font-size: 16px;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 52px;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.contact-icon {
  width: 52px;
  height: 52px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.contact-icon:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  transform: translateY(-2px);
}

.contact-icon svg {
  width: 19px;
  height: 19px;
}

/* === Footer === */
footer {
  padding: 28px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: rgba(240, 238, 255, 0.25);
  font-size: 13px;
}

/* === Scroll Reveal Animations === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Hero reveals happen immediately without delay */
.hero .hero-greeting.visible  { transition-delay: 0s; }
.hero .hero-name.visible      { transition-delay: 0.08s; }
.hero .hero-subtitle.visible  { transition-delay: 0.16s; }
.hero .hero-buttons.visible   { transition-delay: 0.24s; }

/* About stagger */
.about-text.visible   { transition-delay: 0s; }
.about-photo.visible  { transition-delay: 0.12s; }

/* Work stagger */
.projects-grid .project-card:nth-child(1).visible { transition-delay: 0.05s; }
.projects-grid .project-card:nth-child(2).visible { transition-delay: 0.15s; }

/* === Responsive === */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .photo-placeholder {
    aspect-ratio: 4 / 3;
    max-width: 440px;
  }

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

@media (max-width: 640px) {
  .container {
    padding: 0 24px;
  }

  .nav-inner {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(13, 13, 18, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 18px 24px;
    font-size: 16px;
    color: var(--text);
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 68px 24px 0;
    min-height: 100vh;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .about,
  .work,
  .contact {
    padding: 90px 0;
  }

  .section-header {
    margin-bottom: 44px;
  }

  .project-info {
    padding: 20px 22px 24px;
  }
}
