:root {
  --cream: #efe1d4;
  --cream-2: #f4f4f4;
  --ink: #101010;
  --muted: #5b5b5b;
  --line: #d8ccbf;
  --accent: #f4b547;
  --fs-hero: clamp(3rem, 8.2vw, 7rem);
  --fs-section-title: clamp(1.9rem, 4vw, 3.2rem);
  --fs-card-title: clamp(1.12rem, 1.8vw, 1.45rem);
  --fs-body: 1rem;
  --fs-detail: 0.92rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

.topbar {
  height: 84px;
  padding: 0 2.2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8d8d8d 0, #262626 65%, #111 100%);
}

.topbar-right { display: flex; align-items: center; }
.lang-switch {
  display: inline-flex;
  border: 1px solid #bfb4a8;
  border-radius: 999px;
  overflow: hidden;
  margin-right: 1rem;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-weight: 700;
}

.lang-btn.active {
  background: #111;
  color: #fff;
}

.talk-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding-right: 1.8rem;
}

.menu-btn {
  height: 84px;
  width: 84px;
  border: 0;
  background: #151515;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.hero {
  min-height: calc(100vh - 84px);
  padding: 3rem 6vw 2.5rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 1.4rem;
}

.hello { font-size: 2rem; margin: 0; }

.hero h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.55rem, 6.2vw, 5.8rem);
  line-height: 1;
  margin: 0.55rem 0 0.9rem;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.hero-degree {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  letter-spacing: 0.02em;
  font-weight: 700;
  color: #2f2f2f;
}

.subtitle { margin: 0; font-size: clamp(1.08rem, 1.8vw, 1.45rem); font-weight: 600; }

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-links {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-links a {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid #cbbfb2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-links a:hover {
  background: #111;
  color: #fff;
}

.btn {
  border-radius: 10px;
  padding: 0.9rem 1.55rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #bfb4a8;
}

.btn-dark { background: #111; color: #fff; border-color: #111; }
.btn-light { color: #111; background: transparent; }

.stats {
  margin-top: 4rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.stats strong { font-family: "Sora", sans-serif; font-size: 2.3rem; }

.hero-right {
  position: relative;
  min-height: 640px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.shape {
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 42% 0 0 42%;
}

.hero-right img {
  position: relative;
  z-index: 2;
  width: min(92%, 560px);
  height: min(88%, 580px);
  object-fit: cover;
  object-position: center center;
  border-radius: 38% 38% 42% 42%;
  display: block;
}

.ring-badge {
  position: absolute;
  right: 6%;
  bottom: 12%;
  z-index: 3;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 10px solid #111;
  background: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.specialties { background: var(--cream-2); padding: 5rem 6vw; }

.specialties-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.label { margin: 0; color: #f08d21; font-weight: 700; }

.specialties h2,
.about h2,
.contact h2 {
  font-family: "Sora", sans-serif;
  font-size: var(--fs-section-title);
  line-height: 1.08;
  margin: 0.6rem 0 0;
  letter-spacing: -0.03em;
}

.specialties-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.specialties-grid article {
  background: #ececec;
  border-radius: 16px;
  padding: 1.3rem;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.specialties-grid h3 { margin: 0; font-size: var(--fs-card-title); line-height: 1.2; }
.specialties-grid p { margin: 0.75rem 0 0; color: var(--muted); font-size: var(--fs-body); line-height: 1.55; }
.specialties-grid span { margin-top: 1rem; display: inline-block; }

.cta-card { grid-row: span 2; background: #111 !important; color: #fff; }
.cta-card p { color: var(--accent); font-weight: 700; }
.cta-card a {
  color: #fff;
  text-decoration: none;
  font-size: 1.6rem;
  font-family: "Sora", sans-serif;
}

.about {
  background: var(--cream-2);
  padding: 2rem 6vw 5rem;
  display: block;
}

.about-copy p { color: var(--muted); font-size: var(--fs-body); line-height: 1.7; }

.trust-strip {
  background: var(--cream-2);
  padding: 1rem 6vw 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.trust-strip article {
  background: #ececec;
  border-radius: 14px;
  padding: 1rem;
}

.trust-strip h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  line-height: 1.2;
}

.trust-strip p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: var(--fs-detail);
  line-height: 1.5;
}

.content-section {
  background: var(--cream-2);
  padding: 1rem 6vw 2.5rem;
}

.content-section h2 {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: var(--fs-section-title);
  line-height: 1.1;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.02em;
}

.content-section > p {
  color: var(--muted);
  max-width: 74ch;
  font-size: var(--fs-body);
  line-height: 1.7;
}

.portfolio-sidebar-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
}

.portfolio-sidebar {
  background: #e7e7e7;
  border-radius: 14px;
  padding: 1rem;
  position: sticky;
  top: 98px;
  align-self: start;
}

.portfolio-sidebar h3 {
  margin: 0.2rem 0 0.4rem;
  font-family: "Sora", sans-serif;
  font-size: 1.06rem;
}

.portfolio-sidebar ul {
  margin: 0 0 1rem;
  padding-left: 1rem;
  color: var(--muted);
  font-size: var(--fs-detail);
  line-height: 1.5;
}

.sidebar-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #2f2f2f;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sidebar-link:hover {
  color: #000;
}

.portfolio-content-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.portfolio-content-list article {
  background: #ececec;
  border-radius: 14px;
  padding: 1rem;
  scroll-margin-top: 110px;
}

.finetune-showcase {
  grid-column: 1 / -1;
}

.vibe-showcase {
  grid-column: 1 / -1;
}

.pasnet-showcase {
  grid-column: 1 / -1;
}

.office-showcase {
  grid-column: 1 / -1;
}

.office-item + .office-item {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #d8d8d8;
}

.office-item h5 {
  margin: 0 0 0.35rem;
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
}

.image-slider {
  position: relative;
  margin-top: 0.8rem;
  border-radius: 12px;
  overflow: hidden;
  background: #ddd;
  border: 1px solid #d0d0d0;
}

.slides {
  position: relative;
}

.slide {
  display: none;
  margin: 0;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  display: block;
  max-height: 420px;
  object-fit: cover;
  cursor: zoom-in;
}

.slide figcaption {
  padding: 0.75rem 0.9rem;
  background: #fff;
  color: var(--muted);
  font-size: var(--fs-detail);
  line-height: 1.55;
}

.slider-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.7);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  z-index: 3;
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0;
  background: #fff;
}

.slider-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: #c6c6c6;
  cursor: pointer;
}

.slider-dots .dot.active {
  background: #111;
}

.finetune-summary {
  margin-top: 0.85rem;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: #3f3f3f;
}

.project-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: #111;
  font-weight: 700;
  text-underline-offset: 3px;
}

.portfolio-content-list h4 {
  margin: 0 0 0.5rem;
  font-size: var(--fs-card-title);
  line-height: 1.25;
}

.portfolio-content-list p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-detail);
  line-height: 1.55;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.timeline article,
.credentials-grid article {
  background: #ececec;
  border-radius: 14px;
  padding: 1rem;
}

.timeline h3,
.credentials-grid h3 {
  margin: 0.25rem 0;
  font-size: var(--fs-card-title);
  line-height: 1.25;
}

.period {
  margin: 0;
  color: #f08d21;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.timeline article p,
.credentials-grid article p {
  color: var(--muted);
  font-size: var(--fs-detail);
  line-height: 1.55;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.cert-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.65;
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.architecture-grid article {
  background: #ececec;
  border-radius: 14px;
  padding: 1rem;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}

.architecture-block {
  background: #ececec;
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.architecture-block h3 {
  margin: 0 0 0.6rem;
  font-family: "Sora", sans-serif;
  font-size: var(--fs-card-title);
  line-height: 1.25;
}

.architecture-block p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.65;
}

.architecture-block ul {
  margin: 0;
  padding-left: 1.1rem;
}

.architecture-block li {
  color: var(--muted);
  font-size: var(--fs-detail);
  line-height: 1.6;
  margin-bottom: 0.45rem;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.stack-chips span {
  background: #ececec;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.contact {
  background: #111;
  color: #fff;
  padding: 4rem 6vw;
}

.contact p,
.contact a { color: #d8d8d8; }

.contact p {
  font-size: 1.02rem;
  line-height: 1.7;
}

.site-footer {
  padding: 1.2rem 6vw 2rem;
  background: #111;
  color: #8f8f8f;
  border-top: 1px solid #2a2a2a;
  font-size: 0.9rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none !important;
}

.portfolio-modal {
  width: min(1200px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  color: #111;
  border-radius: 18px;
  padding: 1.35rem 1.35rem 1.2rem;
  position: relative;
}

.portfolio-modal h3 {
  margin: 0.35rem 0 0.8rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.portfolio-modal p {
  margin: 0;
  color: #4f4f4f;
  font-size: 1.03rem;
  line-height: 1.75;
}

.modal-image-wrap {
  margin: 0.85rem 0 0.95rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e2e2;
  background: #f7f7f7;
}

#portfolio-modal-image {
  width: 100%;
  max-height: 68vh;
  display: block;
  object-fit: contain;
  background: #f7f7f7;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.85rem;
  border: 0;
  background: #111;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 1.15rem;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: all 0.55s ease;
}

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

@media (max-width: 1100px) {
  .specialties-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-card { grid-row: span 1; }
}

@media (max-width: 900px) {
  .topbar { padding: 0 1rem; }
  .talk-link { display: none; }
  .lang-switch { margin-right: 0.5rem; }
  .menu-btn { width: 62px; height: 62px; }
  .hero,
  .specialties-head { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 2rem 1rem; }
  .hero h1 { max-width: none; font-size: clamp(2.2rem, 12vw, 3.4rem); }
  .hero-degree { margin-left: 0.2rem; font-size: clamp(0.88rem, 3.2vw, 1.05rem); }
  .hero-right { min-height: 440px; }
  .hero-right img {
    width: min(94%, 460px);
    height: min(86%, 420px);
    object-position: center center;
  }
  .specialties,
  .trust-strip,
  .about,
  .content-section,
  .contact { padding-left: 1rem; padding-right: 1rem; }
  .trust-strip,
  .specialties-grid { grid-template-columns: 1fr; }
  .timeline,
  .portfolio-sidebar-layout,
  .portfolio-content-list,
  .architecture-grid,
  .credentials-grid { grid-template-columns: 1fr; }
  .slide img { max-height: 300px; }
  .portfolio-sidebar {
    position: static;
  }
  .site-footer { padding-left: 1rem; padding-right: 1rem; }
}
