:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #151515;
  --muted: #62666d;
  --line: #e8e6e1;
  --accent: #18385f;
  --soft: #eef4fb;
  --max: 1120px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
strong { color: var(--text); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 251, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  margin: auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 850;
  letter-spacing: -0.03em;
}

.navlinks {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.menu {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  font-weight: 750;
}

.section {
  max-width: var(--max);
  margin: auto;
  padding: 86px 24px;
}

.hero {
  min-height: 82vh;
  display: flex;
  align-items: center;
}

.hero-identity {
  margin-top: 1rem;
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.9;
}

.hero-inner { max-width: 980px; }

.eyebrow,
.section-label,
.project-meta p,
.case-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 850;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h1 { font-size: clamp(2.6rem, 6vw, 5.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.25rem; }

p {
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-text {
  font-size: 1.18rem;
  max-width: 820px;
  margin-top: 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.small-actions { margin-top: 18px; }

.button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 850;
  transition: 0.18s ease;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  border-top: 1px solid var(--line);
}

.pills,
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.pills span,
.tags span {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-head {
  max-width: 850px;
  margin-bottom: 34px;
}

.case-card {
  background: var(--surface);
  border: 1px solid #d6e1ee;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 16px 45px rgba(24,56,95,0.06);
}

.case-intro { max-width: 830px; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.case-grid div {
  grid-column: span 2;
}

.case-grid div,
.mini-card,
.skill-card,
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.case-grid strong {
  display: block;
  color: var(--accent);
  margin-bottom: 8px;
}

.case-grid span { color: var(--muted); }

.compact { padding-top: 54px; }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.mini-card h3 { font-size: 1.05rem; }
.mini-card p { font-size: 0.95rem; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-card {
  border-color: #d6e1ee;
  box-shadow: 0 14px 36px rgba(24,56,95,0.05);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.badge {
  font-size: 0.72rem;
  font-weight: 850;
  color: var(--accent);
  background: var(--soft);
  border: 1px solid #d8e4f2;
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
}

.badge.muted {
  color: var(--muted);
  background: #f5f5f3;
  border-color: var(--line);
}

.tags span {
  background: var(--soft);
  border-color: #d8e4f2;
  color: var(--accent);
}

.links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.links a {
  color: var(--accent);
  font-weight: 850;
  font-size: 0.94rem;
  border-bottom: 1px solid transparent;
}

.links a:hover { border-bottom-color: var(--accent); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.skill-card {
  grid-column: span 2;
}

.contact {
  border-top: 1px solid var(--line);
  max-width: 920px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px;
  text-align: center;
}

footer p {
  font-size: 0.92rem;
  margin: 0;
}

@media (max-width: 1100px) {
  .focus-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .two-col,
  .case-grid,
  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 66px 20px;
  }

  .hero {
    min-height: auto;
    padding-top: 96px;
  }
}


@media (max-width: 760px) {
  .menu { display: inline-block; }
  .nav { position: relative; }

  .navlinks {
    display: none;
    position: absolute;
    top: 64px;
    left: 20px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    flex-direction: column;
  }

  .navlinks.open { display: flex; }
  .focus-grid { grid-template-columns: 1fr; }
}


.portfolio-notice {
  max-width: var(--max);
  margin: -10px auto 0;
  padding: 0 24px;
}

.notice-content {
  background: linear-gradient(
    135deg,
    rgba(24,56,95,0.06),
    rgba(24,56,95,0.02)
  );
  border: 1px solid #d8e4f2;
  border-radius: var(--radius);
  padding: 22px 26px;
}

.notice-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notice-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}


#backToTop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: 0.25s ease;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  transform: translateY(-4px);
}
