@charset "UTF-8";

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  --bg:          #f5f6fa;
  --bg-card:     #ffffff;
  --bg-card-2:   #f0f2f8;
  --border:      #dde1ee;
  --accent:      #4a6cf7;
  --accent-soft: #4a6cf714;
  --accent2:     #e05c8a;
  --text:        #1a1d2e;
  --text-muted:  #5a6080;
  --text-dim:    #9aa0be;
  --star:        #f5a623;
  --nav-bg:      #ffffff;
  --header-h:    160px;
  --radius:      10px;
  --font-display: 'DM Serif Display', 'Georgia', serif;
  --font-body:   'DM Sans', 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow:      0 4px 24px rgba(74,108,247,0.08);
  --glow:        0 0 30px rgba(74,108,247,0.12);
}

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

/* ─── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.5rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 0.4rem; }
h4 { font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 1rem 0 0.3rem; }

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

p { color: var(--text-muted); margin-bottom: 0.75rem; }

/* ─── Header ─────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #e8ecff 0%, #f0f4ff 50%, #e4eaff 100%);
  border-bottom: 1px solid var(--border);
  padding: 50px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(74,108,247,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(224,92,138,0.08) 0%, transparent 70%);
  pointer-events: none;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

header h1 {
  position: relative;
  color: var(--text);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  animation: fadeSlideDown 0.7s var(--ease) both;
}

/* ─── Navigation ─────────────────────────────────────────── */
nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 12px rgba(74,108,247,0.07);
}

nav ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  margin: 0 auto;
  max-width: 900px;
  padding: 0 20px;
}

nav ul li { flex: 1 0 auto; }

nav ul li a {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 18px 12px;
  text-align: center;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--accent);
  transition: left 0.2s var(--ease), right 0.2s var(--ease);
}

nav ul li a:hover { color: var(--text); background: rgba(74,108,247,0.05); }
nav ul li a:hover::after { left: 10%; right: 10%; }

.current {
  color: var(--accent) !important;
}
.current::after { left: 10% !important; right: 10% !important; }

/* ─── Layout ─────────────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.content-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

section {
  margin: 32px auto;
}

/* ─── Overview Panel ─────────────────────────────────────── */
.parent {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.parent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

ul.overview {
  display: inline-block;
  text-align: left;
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
}

ul.overview li {
  color: var(--text-muted);
  padding: 5px 0 5px 28px;
  position: relative;
  font-size: 0.95rem;
}

ul.overview li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ─── Flex Grid ──────────────────────────────────────────── */
.flex-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.flex-item {
  flex: 1 1 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.5s var(--ease) both;
}

.flex-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--glow), var(--shadow);
}

/* ─── Project Images ─────────────────────────────────────── */
.project-image {
  display: block;
  width: 100%;
  border-radius: 6px;
  margin: 10px 0 14px;
  border: 1px solid var(--border);
  transition: opacity 0.2s;
}
.project-image:hover { opacity: 0.85; }

/* ─── Criteria Tags (Home) ───────────────────────────────── */
.criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 12px 0;
}

.criteria p {
  float: none;
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 6px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.criteria p:hover { border-color: var(--accent); color: var(--text); }

.clear::after { content: ""; clear: both; display: table; }

/* ─── Accordion ──────────────────────────────────────────── */
.accordion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-card-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 6px 0 2px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.accordion::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s;
}

.accordion.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.accordion.active::after { transform: rotate(45deg); }
.accordion:hover { border-color: var(--accent); }

.panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 0 0 6px 6px;
  margin-bottom: 4px;
}

.panel.open {
  border-color: var(--border);
  border-top: none;
}

.panel p { padding: 14px 16px 4px; margin: 0; font-size: 0.9rem; }
.panel .padding { padding: 14px 16px 4px; }

/* ─── Star Rating ────────────────────────────────────────── */
.rating {
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rating h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  margin: 0;
}

.fa-star { color: var(--text-dim); font-size: 0.9rem; }
.checked { color: var(--star); }

/* ─── Alert ──────────────────────────────────────────────── */
.alert {
  background: rgba(255, 200, 50, 0.2);
  color: #b07d00;
  border: 1px solid rgba(255,200,50,0.3);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ─── iFrame ─────────────────────────────────────────────── */
iframe {
  display: block;
  width: 100%;
  max-width: 540px;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 10px auto;
}

/* ─── LP4 specific layout helpers ───────────────────────── */
.lp-plan { max-width: 680px; margin: 0 auto; }
.description, .reflection { justify-content: center; }

#portfolio { width: 100%; max-width: 680px; margin: 0 auto; }

/* ─── Back to Top ────────────────────────────────────────── */
#myBtn {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 999;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 40px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(74,108,247,0.2);
}

#myBtn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 20px;
}

footer p { color: var(--text-dim); font-size: 0.85rem; margin: 4px 0; }
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }
footer img { opacity: 0.5; vertical-align: middle; filter: grayscale(1); }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* stagger cards */
.flex-item:nth-child(1) { animation-delay: 0.05s; }
.flex-item:nth-child(2) { animation-delay: 0.12s; }
.flex-item:nth-child(3) { animation-delay: 0.19s; }
.flex-item:nth-child(4) { animation-delay: 0.26s; }

/* ─── Media Queries ──────────────────────────────────────── */
@media (max-width: 768px) {
  header { padding: 36px 20px; }

  nav ul { flex-direction: row; }
  nav ul li a { padding: 14px 8px; font-size: 0.75rem; }

  main, .content-container { padding: 24px 16px 60px; }

  .flex-container { flex-direction: column; }

  .parent { padding: 24px 20px; }

  .criteria { gap: 8px; }

  #portfolio { max-width: 100%; }
}

@media (max-width: 480px) {
  h4 { font-size: 0.85rem; }
  nav ul li a { padding: 12px 4px; font-size: 0.7rem; letter-spacing: 0.04em; }
}