/* ===== Portofolio Rusly Tomagola — Mobile First =====
   Breakpoint: 768px (tablet), 1024px (desktop)            */
:root {
  --fog: #EEF1F5;
  --paper: #FFFFFF;
  --ink: #0E1A2B;
  --ink-soft: #4A5568;
  --line: #CBD3DF;
  --red: #C8102E;
  --yellow: #F2B705;
  --blue: #1D3F8F;

  --f-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", Consolas, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--fog);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
code, .mono { font-family: var(--f-mono); font-size: .9em; }

/* ----- Header: Flexbox ----- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 5%;
  background: rgba(238, 241, 245, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 3px; text-decoration: none; }
.brand-text { font-family: var(--f-display); font-weight: 800; letter-spacing: -.01em; }

.nav-toggle {
  font: 500 .9rem var(--f-mono);
  background: var(--ink); color: var(--fog);
  border: 0; border-radius: 4px;
  padding: 8px 14px; cursor: pointer;
}
.site-nav { display: none; width: 100%; flex-direction: column; padding-top: 6px; }
.site-nav.open { display: flex; }
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
}
.site-nav a:hover { color: var(--red); }

/* ----- Home ----- */
.home {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 48px 5% 56px;
  max-width: 1200px;
  margin: auto;
}
.home-text { flex: 1; min-width: 0; }
.kicker { font-family: var(--f-mono); font-size: .8rem; color: var(--ink-soft); margin-bottom: 14px; }
.display {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 15vw, 7.5rem);
  line-height: .88;
  letter-spacing: -.045em;
  margin-bottom: 22px;
}
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; margin-bottom: 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  font: 600 1rem var(--f-body);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 4px;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn-solid { background: var(--ink); color: var(--fog); }
.btn-solid:hover { background: var(--red); border-color: var(--red); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--paper); }
.btn:active { transform: translateY(1px); }

/* Foto diganti inisial teks; ganti dengan <img> bila ada foto */
.home-photo {
  width: 100%; max-width: 320px; aspect-ratio: 1;
  container-type: inline-size;
  display: grid; place-items: center;
  background: var(--ink); color: var(--fog);
  border-radius: 6px; box-shadow: 10px 10px 0 var(--yellow);
}
.home-photo span { font-family: var(--f-display); font-weight: 800; font-size: 42cqw; letter-spacing: -.05em; }

/* ----- Section umum ----- */
.block {
  max-width: 1200px;
  margin: auto;
  padding: 56px 5%;
  border-top: 1px solid var(--line);
}
.label { font-family: var(--f-mono); font-size: .85rem; color: var(--red); margin-bottom: 4px; }
.block h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.2rem);
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 28px;
}

/* About */
.about-grid { display: grid; gap: 18px; }
.about-grid > p { max-width: 38rem; }
.facts { display: grid; gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.facts div { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--f-mono); font-size: .75rem; color: var(--ink-soft); }
.facts dd { font-weight: 600; }

/* Skills */
.skill-groups { display: grid; gap: 26px; }
.skill-group h3 { font-family: var(--f-mono); font-weight: 500; font-size: .9rem; color: var(--ink-soft); margin-bottom: 10px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 99px;
  padding: 6px 14px;
  font-weight: 500;
}
.chips-soft li { border-style: dashed; border-color: var(--ink-soft); color: var(--ink-soft); }

/* Projects: Grid auto-fit */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.project {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 22px 22px;
  overflow: hidden;
}
.project-strip { height: 10px; margin: 0 -22px 20px; }
.strip-r { background: var(--red); }
.strip-t { background: var(--blue); }
.strip-y { background: var(--yellow); }
.project h3 { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; line-height: 1.2; margin-bottom: 8px; }
.project p { color: var(--ink-soft); margin-bottom: 14px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tags li { font-family: var(--f-mono); font-size: .75rem; background: var(--fog); padding: 2px 8px; border-radius: 3px; }
.project-link { margin-top: auto; font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.project-link:hover { color: var(--red); }

/* Contact: form responsif */
.contact-wrap { width: 100%; max-width: 760px; }
.contact-intro { color: var(--ink-soft); margin-bottom: 20px; }
.contact-form { display: grid; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
input, textarea, button { width: 100%; box-sizing: border-box; }
input, textarea {
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--fog);
}
input:focus, textarea:focus { border-color: var(--ink); background: var(--paper); }
.invalid { border-color: var(--red); background: #FDF1F3; }
.error { color: var(--red); font-size: .85rem; min-height: 1.3em; margin-top: 4px; }
.form-status { margin-top: 12px; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #1E7B4F; }

.site-footer {
  text-align: center;
  padding: 28px 5%;
  font-size: .85rem;
  color: var(--fog);
  background: var(--ink);
}

/* ===== Tablet ≥ 768px ===== */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: flex; flex-direction: row; width: auto; gap: 22px; padding: 0; }
  .site-nav a { border: 0; padding: 4px 0; }
  .home { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 72px; padding-bottom: 80px; }
  .display { font-size: clamp(3.2rem, 9.5vw, 7.5rem); }
  .home-photo { flex: 0 0 220px; }
  .skill-groups { grid-template-columns: repeat(2, 1fr); }
  .contact-form { grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .field-full { grid-column: 1 / -1; }
  .contact-form .btn { width: auto; }
}

/* ===== Desktop ≥ 1024px ===== */
@media (min-width: 1024px) {
  .home { min-height: calc(100vh - 60px); padding-top: 40px; }
  .home-photo { flex-basis: 340px; }
  .about-grid { grid-template-columns: 1fr 1fr 300px; gap: 32px; align-items: start; }
  .skill-groups { grid-template-columns: repeat(3, 1fr); }
  .block { padding-top: 80px; padding-bottom: 80px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
