/* =========================================================
   styles.css — all visual styling lives here.
   Think of CSS as: "select an element, then describe how it looks."
   The tree of ideas:
     - Variables at the top (colors, sizes) so you change them in one place
     - Base styles (body, h1, p)
     - Layout (nav, sections)
     - Components (cards, buttons)
     - Responsive rules at the bottom (for phones/tablets)
   ========================================================= */

/* ---- 1. CSS variables: edit these to restyle the whole site ---- */
:root {
  --bg:        #0b0b0f;     /* main background (dark works best for 3D work) */
  --bg-alt:    #111118;     /* alternating section background */
  --text:      #eceef2;     /* main text */
  --muted:     #a09890;     /* secondary text — warm grey */
  --accent:    #c8b47a;     /* sandy cream */
  --border:    rgba(255,255,255,0.08);
  --max-width: 1200px;
  --radius:    14px;
  --transition: 220ms ease;
}

/* ---- 2. Reset: make every browser start from the same baseline ---- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

/* ---- 3. Navigation ---- */
.nav {
  position: sticky;       /* stays at top when you scroll */
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(11, 11, 15, 0.8);
  backdrop-filter: blur(12px);  /* frosted-glass effect */
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Kaisei Tokumin', serif;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 18px;
}
.nav-logo span { color: var(--accent); font-weight: 300; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
}
.nav-cta:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- 4. Hero section ---- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 80px 40px;
  background:
    radial-gradient(circle at 20% 30%, rgba(200,180,122,0.12), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(200,180,122,0.06), transparent 60%),
    linear-gradient(to right, rgba(11,11,15,0.9) 40%, rgba(11,11,15,0.1)),
    url('images/Quantum-Swap-Gates.png') 70% center / cover no-repeat;
}
.hero-content { max-width: var(--max-width); width: 100%; margin: 0 auto; }

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h1, h2, h3 {
  font-family: 'Kaisei Tokumin', serif;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);   /* scales between mobile and desktop */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 900px;
}
.accent { color: var(--accent); }

.subhead {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--muted);
  max-width: 620px;
  margin-top: 28px;
}

.hero-cta { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- 5. Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-large { padding: 14px 28px; font-size: 15px; }

/* ---- 6. Generic section ---- */
.section { padding: 120px 40px; }
.section-alt { background: var(--bg-alt); }
.section-header { max-width: var(--max-width); margin: 0 auto 60px; }
.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-header p { color: var(--muted); margin-top: 12px; }

/* ---- 7. Project grid ---- */
.grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* 2 columns on desktop */
  gap: 28px;
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.18); }

.project-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.project-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms ease;
}
.project-card:hover .project-media img { transform: scale(1.04); }

.project-info { padding: 24px; }
.tag {
  display: inline-block;
  background: rgba(122,179,240,0.12);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.project-info h3 { font-size: 1.4rem; margin-bottom: 6px; }
.project-info p  { color: var(--muted); font-size: 0.95rem; }

/* ---- 8. About ---- */
.about-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 24px; }
.about-text p  { color: var(--muted); margin-bottom: 20px; max-width: 580px; }
.about-badge { display: flex; align-items: center; justify-content: center; }

.profile-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 280px;
  width: 100%;
  text-align: center;
}
.profile-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 60% 20%;
  display: block;
}
.profile-card-info {
  padding: 20px;
}
.profile-card-info h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text);
}
.profile-card-info p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.profile-card-btn {
  font-size: 13px;
  padding: 10px 20px;
}

.stats {
  list-style: none;
  display: flex;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 2rem; color: var(--text); }
.stats span { color: var(--muted); font-size: 0.9rem; }

.about-image img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---- 9. Services ---- */
.services-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service {
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  transition: var(--transition);
}
.service:hover { border-color: var(--accent); transform: translateY(-4px); }
.service h3 { margin-bottom: 12px; font-size: 1.25rem; }
.service p  { color: var(--muted); }

.extra-card {
  display: none;
}
.extra-card.visible {
  display: block;
}

.view-more-wrap {
  max-width: var(--max-width);
  margin: 48px auto 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.view-more-wrap::before,
.view-more-wrap::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

#view-more-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
}
#view-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
#view-more-btn .chevron {
  display: inline-block;
  transition: transform 300ms ease;
  font-size: 12px;
}
#view-more-btn.expanded .chevron {
  transform: rotate(180deg);
}

/* ---- 10. Project Modal ---- */
.project-card { cursor: pointer; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 300ms ease;
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.modal-video-wrap iframe,
.modal-video-wrap img {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: contain;
}
.modal-video-wrap img { display: none; }

.modal-body {
  padding: 28px 32px 36px;
}
.modal-body h3 {
  font-size: 1.8rem;
  margin: 12px 0 16px;
}
.modal-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal-field {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}
.modal-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.modal-field p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.modal-links a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
  transition: var(--transition);
}
.modal-links a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---- 11. Testimonial ---- */
.testimonial-wrap {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.testimonial p {
  font-family: 'Kaisei Tokumin', serif;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 32px;
}
.testimonial cite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-style: normal;
}
.testimonial cite strong {
  color: var(--text);
  font-size: 1rem;
}
.testimonial cite span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- 11. Contact ---- */
.contact {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.contact h2 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 20px; }
.contact p  { color: var(--muted); margin-bottom: 40px; }
.socials { margin-top: 24px; display: flex; gap: 28px; justify-content: center; }
.socials a { color: var(--text); border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; padding: 10px 24px; font-size: 14px; font-weight: 600; transition: var(--transition); }
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- 13. Footer ---- */
.footer {
  padding: 30px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* ---- 14. Responsive (phones & tablets) ---- */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav-links { gap: 18px; font-size: 14px; }
  .section, .hero { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav-links li:not(:last-child) { display: none; }  /* hide middle links on tiny screens */
}
