@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --paper: #f4f6f0;
  --surface: #ffffff;
  --ink: #172c2b;
  --muted: #687875;
  --line: #dce4dd;
  --green: #17665e;
  --lime: #d9ef8a;
  --coral: #df765e;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1160px);
  min-height: 72px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--green);
}

.portfolio-link {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
}

.hero {
  position: relative;
  display: flex;
  min-height: min(560px, calc(100svh - 145px));
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 72px);
  overflow: hidden;
  padding: 64px max(24px, calc((100% - 1080px) / 2));
  background-image:
    linear-gradient(
      90deg,
      rgba(13, 45, 42, 0.9) 0%,
      rgba(13, 45, 42, 0.68) 45%,
      rgba(13, 45, 42, 0.16) 100%
    ),
    url("https://images.unsplash.com/photo-1455390582262-044cdead277a?auto=format&fit=crop&w=1800&q=85");
  background-position: center 48%;
  background-size: cover;
  color: white;
}

.hero-inner {
  flex: 1 1 480px;
  width: min(100%, 520px);
  text-align: center;
  animation: arrive 0.55s ease-out both;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.hero .eyebrow {
  color: var(--lime);
}

.hero h1 {
  margin: 14px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 64px;
  line-height: 1;
}

.hero-copy {
  max-width: 440px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.65;
}

.timer-widget {
  display: grid;
  flex: 1 1 420px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 20px;
  max-width: 480px;
  padding: 22px 24px;
  border-radius: 8px;
  background: var(--green);
  color: white;
}

#focus-time {
  font-family: "Space Grotesk", sans-serif;
  font-size: 56px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.timer-controls {
  display: flex;
  gap: 8px;
}

.timer-controls button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.timer-start {
  border: 0;
  background: var(--lime);
  color: var(--ink);
}

.timer-start:hover {
  transform: translateY(-1px);
  background: #e7f7b1;
}

.timer-reset {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: white;
}

.timer-reset:hover {
  background: rgba(255, 255, 255, 0.1);
}

#timer-status {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: 0;
  color: var(--lime);
  font-size: 11px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .topbar {
    width: calc(100% - 32px);
  }

  nav {
    gap: 14px;
  }

  nav a {
    font-size: 12px;
  }

  .hero {
    min-height: min(500px, calc(100svh - 170px));
    padding: 54px 24px;
    background-position: 60% center;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-note {
    right: 24px;
    bottom: 18px;
  }

  .hero {
    flex-direction: column;
    justify-content: center;
    gap: 24px;
  }

  .hero-inner,
  .timer-widget {
    flex: 0 1 auto;
    width: min(100%, 520px);
    max-width: 520px;
  }
}

@media (max-width: 480px) {
  .topbar {
    min-height: 64px;
  }

  .brand {
    font-size: 22px;
  }

  nav {
    gap: 10px;
  }

  nav a {
    font-size: 11px;
  }

  .portfolio-link {
    padding: 8px 9px;
  }

  .hero {
    min-height: min(460px, calc(100svh - 150px));
    padding: 42px 20px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .timer-widget {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  #focus-time {
    font-size: 48px;
  }

  #timer-status {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
