/* =========================================================
   Ouji Katami — Portfolio
   Palette
     --bg: #0C1418   --text: #F6F6F6
     --muted: #99A0AE --teal: #428898
   ========================================================= */

:root {
  --bg: #0C1418;
  --bg-deep: #080F12;
  --card: #111d22;
  --text: #F6F6F6;
  --muted: #99A0AE;
  --teal: #428898;
  --border: rgba(246, 246, 246, 0.08);
  --radius: 14px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", "SF Pro Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.container.narrow { max-width: 880px; }

/* ===== NAVBAR ===== */
.glass-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(12, 20, 24, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(246, 246, 246, 0.06);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
}
.logo {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
}
.logo span { color: var(--teal); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.9rem; color: var(--muted);
  transition: color .25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; font-size: 1.25rem; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(12, 20, 24, 0.95);
    backdrop-filter: blur(14px);
    padding: 0 1.5rem;
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-links.open { max-height: 300px; padding: 0.5rem 1.5rem 1rem; }
  .nav-links li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
}

/* ===== HERO ===== */
.hero { padding: 9rem 0 6rem; position: relative; }
@media (min-width: 640px) { .hero { padding: 11rem 0 8rem; } }
.grid-bg {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(66, 136, 152, 0.18), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(66, 136, 152, 0.10), transparent 50%),
    linear-gradient(rgba(246,246,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246,246,246,0.04) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
}
.hero-inner { text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border);
  padding: 0.4rem 1rem; border-radius: 999px;
  font-size: 0.75rem; color: var(--muted);
  backdrop-filter: blur(4px);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }

.hero h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.text-gradient {
  background: linear-gradient(135deg, #F6F6F6 0%, #99c4cf 60%, #428898 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub {
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 500;
}
.hero .desc {
  max-width: 38rem; margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
}
.cta-row { margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  transition: all .3s ease;
}
.btn-outline { border: 2px solid var(--teal); color: var(--text); }
.btn-outline:hover { background: rgba(66, 136, 152, 0.1); transform: translateY(-2px); }
.btn-outline:hover i { transform: translateY(2px); transition: transform .3s ease; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); }

/* ===== SECTIONS ===== */
.section { padding: 6rem 0; }
.section-header { text-align: center; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600; color: var(--teal); }
.section-header h2 { margin-top: 0.75rem; font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
.section-header > p { margin: 0.75rem auto 0; max-width: 32rem; color: var(--muted); }

/* ===== PROJECT CARD ===== */
.teal-glow {
  box-shadow:
    0 0 0 1px rgba(66, 136, 152, 0.6),
    0 0 24px -2px rgba(66, 136, 152, 0.45),
    0 0 60px -10px rgba(66, 136, 152, 0.5);
  transition: box-shadow .35s ease, transform .35s ease;
}
.teal-glow:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(66, 136, 152, 0.95),
    0 0 36px -2px rgba(66, 136, 152, 0.7),
    0 0 90px -10px rgba(66, 136, 152, 0.55);
}
.project-card {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius-lg);
  color: var(--text);
}
@media (min-width: 768px) {
  .project-card { grid-template-columns: 260px 1fr; align-items: center; padding: 2.5rem; }
}
.project-logo {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(66,136,152,0.15), transparent);
  border: 1px solid rgba(66,136,152,0.35);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.project-logo img { width: 75%; height: 75%; object-fit: contain; }
.logo-fallback {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  font-size: 4rem; font-weight: 800; color: var(--teal);
}
.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(66,136,152,0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(66,136,152,0); }
}
.project-body h3 { margin-top: 0.75rem; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
.project-body > p { margin-top: 1rem; color: var(--muted); font-size: 1rem; }
.feature-grid {
  margin-top: 1.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
  max-width: 28rem;
}
.feature {
  border: 1px solid var(--border);
  background: rgba(12,20,24,0.4);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.feature i { color: var(--teal); font-size: 1.1rem; }
.feature span { display: block; margin-top: 0.25rem; font-size: 0.7rem; color: var(--muted); }
.visit-link { margin-top: 1.75rem; display: inline-flex; gap: 0.5rem; color: var(--teal); font-weight: 600; font-size: 0.9rem; }

/* ===== TIMELINE ===== */
.timeline {
  margin-top: 3rem;
  list-style: none;
  border-left: 1px solid var(--border);
  padding-left: 1.75rem;
}
@media (min-width: 640px) { .timeline { padding-left: 2.75rem; } }
.timeline li { position: relative; padding-bottom: 2.5rem; }
.timeline li:last-child { padding-bottom: 0; }
.t-icon {
  position: absolute; left: -2.2rem; top: 0.2rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--card); border: 1px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(66,136,152,0.45);
  color: var(--teal);
}
@media (min-width: 640px) { .t-icon { left: -3.4rem; } }
.timeline h4 { font-size: 1.25rem; font-weight: 600; }
.timeline p { margin-top: 0.5rem; color: var(--muted); }

/* ===== FOOTER / CONTACT ===== */
.footer {
  margin-top: 3rem;
  padding: 5rem 0 2.5rem;
  background: var(--bg-deep);
}

.contact-widget {
  margin-top: 2.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: 0 25px 60px -20px rgba(0,0,0,0.6);
}
.tab-bar {
  display: flex; gap: 0.25rem;
  background: rgba(12,20,24,0.6);
  border-radius: 16px; padding: 0.25rem;
}
.tab {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 0.75rem; border-radius: 12px;
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted);
  transition: all .25s ease;
}
.tab.active {
  background: var(--teal); color: #0C1418;
  box-shadow: 0 6px 20px -6px rgba(66,136,152,0.7);
}
@media (max-width: 480px) { .tab span { display: none; } }

.tab-body { padding: 1.5rem; }
.tab-panel { display: none; flex-direction: column; gap: 0.75rem; }
.tab-panel.active { display: flex; }
.tab-panel input, .tab-panel textarea {
  width: 100%;
  background: rgba(12,20,24,0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font: inherit; font-size: 0.9rem;
  outline: none;
  transition: border-color .25s ease;
}
.tab-panel textarea { resize: none; }
.tab-panel input::placeholder, .tab-panel textarea::placeholder { color: var(--muted); }
.tab-panel input:focus, .tab-panel textarea:focus { border-color: var(--teal); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--teal); color: #0C1418;
  padding: 0.85rem 1rem; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 10px 30px -10px rgba(66,136,152,0.7);
  transition: filter .25s ease, transform .25s ease;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.status-msg {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(66,136,152,0.5);
  background: rgba(66,136,152,0.08);
  border-radius: 10px;
  color: var(--teal);
  font-size: 0.875rem;
}

/* ===== SOCIALS ===== */
.socials {
  margin-top: 3rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
  font-size: 1.5rem;
}
.social-icon {
  color: var(--muted);
  transition: color .25s ease, transform .25s ease, text-shadow .25s ease;
}
.social-icon:hover {
  color: var(--teal);
  transform: scale(1.15);
  text-shadow: 0 0 12px rgba(66,136,152,0.7);
}

.copyright {
  margin-top: 2.5rem; text-align: center;
  color: var(--muted); font-size: 0.875rem;
}

/* ===== ANIMATIONS ===== */
.fade-up   { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) both; }
.fade-up-2 { animation: fadeUp .8s .15s cubic-bezier(.2,.7,.2,1) both; }
.fade-up-3 { animation: fadeUp .8s .30s cubic-bezier(.2,.7,.2,1) both; }
.fade-up-4 { animation: fadeUp .8s .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
