/* ==========================================================================
   Reski Setiawan — Personal Portfolio
   Design tokens
   ========================================================================== */

:root {
  /* Color */
  --bg: #0b0d12;
  --bg-elevated: #12151c;
  --bg-elevated-2: #171b24;
  --border: #232833;
  --border-soft: #1a1e28;
  --text-primary: #f3f5f7;
  --text-secondary: #8a93a3;
  --text-tertiary: #5b6270;
  --accent: #2bd9b5;
  --accent-dim: #1c8f76;
  --accent-warm: #f5b942;
  --focus-ring: #5fa8ff;

  /* Type */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --max-width: 1080px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --section-pad: clamp(64px, 10vw, 120px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 32px);
  padding-right: clamp(20px, 5vw, 32px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 217, 181, 0.18);
  flex: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, 0.75);
  border-bottom: 1px solid var(--border-soft);
}

.navbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.nav-brand .cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 260px;
  }

  .nav-links li {
    border-top: 1px solid var(--border-soft);
  }

  .nav-links a {
    display: block;
    padding: 16px clamp(20px, 5vw, 32px);
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(64px, 12vw, 120px);
  padding-bottom: var(--section-pad);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 480px;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(43, 217, 181, 0.14),
    transparent 65%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.photo-ring {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(
    from 180deg,
    var(--accent),
    var(--border) 35%,
    var(--border) 65%,
    var(--accent-warm) 100%
  );
  margin-bottom: 6px;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--bg-elevated);
  border: 3px solid var(--bg);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
}

.hero-role {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--text-primary);
  font-weight: 500;
}

.hero-focus {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.hero-focus span {
  color: var(--accent);
}

.hero-desc {
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 16px;
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #04140f;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #3be6c0;
}

.btn-secondary {
  border-color: var(--border);
  color: var(--text-primary);
  background: transparent;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
}

/* ---------- Sections ---------- */

section {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--border-soft);
}

.section-head {
  margin-bottom: 40px;
  max-width: 620px;
}

.section-head h2 {
  font-size: clamp(24px, 3.4vw, 32px);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 720px;
}

.about-grid p {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0;
}

/* ---------- Education ---------- */

.edu-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 620px;
}

.edu-marker {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
}

.edu-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.edu-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ---------- Interests ---------- */

.interest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.interest-card {
  padding: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.interest-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.interest-card .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
  display: block;
}

.interest-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.interest-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Project ---------- */

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 720px;
}

.project-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-elevated-2);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.project-card-head .path {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.project-card-body {
  padding: 28px;
}

.project-card-body h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.project-card-body p {
  color: var(--text-secondary);
  margin: 0 0 20px;
  font-size: 15.5px;
  max-width: 560px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

footer p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-tertiary);
}

footer .role-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
}