:root {
  --bg: #0b0b0e;
  --bg-soft: #101015;
  --fg: #e7e7ea;
  --muted: #6f6f78;
  --line: #1d1d22;
  --accent: #00add8;   /* Go cyan */
  --accent-2: #5dc9e2; /* light Go cyan — cursor / hover */

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 6rem;

  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
    "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

ul,
ol,
dl,
dd {
  list-style: none;
}

/* === Background dot grid === */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 173, 216, 0.16) 1px, transparent 1.6px);
  background-size: 30px 30px;
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

/* === Section heading (// About) === */
.section-heading {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-heading::before {
  content: "//";
  color: var(--accent);
  opacity: 0.55;
}

.section-heading::after {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

[data-reveal].visible {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
}

.hero-nav {
  position: absolute;
  top: var(--space-md);
  left: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

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

.hero-nav__link {
  color: var(--muted);
  transition: color 200ms ease-out;
}

.hero-nav__link:hover,
.hero-nav__link:focus-visible {
  color: var(--accent);
}

.hero-title {
  font-family: var(--mono);
  font-size: clamp(2.75rem, 16vw, 12rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--fg);
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero-title__typewriter {
  display: inline-block;
  min-width: 1ch;
  color: var(--accent);
}

.hero-title__typewriter::after {
  content: "";
  display: inline-block;
  width: 0.5ch;
  height: 0.92em;
  background: var(--accent-2);
  margin-left: 3px;
  vertical-align: -0.1em;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.hero-foot {
  position: absolute;
  left: var(--space-lg);
  bottom: var(--space-lg);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-foot__cmt {
  opacity: 0.6;
  margin-right: 0.25rem;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-title__typewriter::after {
    animation: none;
    opacity: 0;
  }
}

/* === About === */
.about {
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--space-xl) var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: center;
}

.about-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(0, 173, 216, 0.4);
  background: var(--bg-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--fg);
}

.about-text strong {
  font-weight: 600;
  color: #ffffff;
}

/* === Contacts === */
.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 200ms ease-out, border-color 200ms ease-out;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--accent);
  border-color: rgba(0, 173, 216, 0.5);
}

.contact-link svg {
  flex-shrink: 0;
}

/* Icon-only chips: label is for screen readers only */
.contact-link__name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Footer === */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  gap: var(--space-sm);
}

.site-footer__top {
  font-size: 1rem;
  color: var(--muted);
  transition: color 200ms ease-out;
}

.site-footer__top:hover,
.site-footer__top:focus-visible {
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   - <= 1024px : tablet — narrower padding
   - <= 720px  : mobile — single-column About, stacked footer
   - <= 480px  : small mobile — tighter, smaller photo
   ============================================================ */

@media (max-width: 1024px) {
  .hero {
    padding: var(--space-lg) var(--space-md);
  }
  .hero-nav {
    left: var(--space-md);
    right: var(--space-md);
  }
  .hero-foot {
    left: var(--space-md);
  }
  .hero-title {
    font-size: clamp(2.75rem, 13vw, 10rem);
  }
  .about {
    padding: var(--space-lg) var(--space-md);
  }
  .site-footer {
    padding: var(--space-md);
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 5rem var(--space-md) var(--space-lg);
    justify-content: center;
    text-align: center;
  }
  .hero-nav {
    top: var(--space-sm);
    left: var(--space-md);
    right: var(--space-md);
  }
  .hero-foot {
    display: none;
  }
  .hero-title {
    font-size: clamp(2.5rem, 13vw, 5rem);
  }

  .about {
    min-height: auto;
    justify-content: flex-start;
    padding: 4rem var(--space-md);
  }
  .about .section-heading {
    align-self: center;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    justify-items: center;
    text-align: center;
  }
  .about-body {
    text-align: center;
    max-width: 420px;
  }
  .about-photo {
    width: 180px;
    height: 180px;
  }

  .contacts {
    justify-content: center;
    border-top: none;
    margin-top: var(--space-lg);
    padding-top: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 4.5rem var(--space-sm) var(--space-lg);
  }
  .hero-nav {
    left: var(--space-sm);
    right: var(--space-sm);
    top: 0.75rem;
  }
  .hero-title {
    font-size: clamp(2.25rem, 13vw, 4rem);
  }

  .about {
    padding: 3rem var(--space-sm) 4rem;
  }
  .about-photo {
    width: 140px;
    height: 140px;
  }
  .about-text {
    font-size: 1rem;
  }

  .bg-grid {
    background-size: 24px 24px;
  }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bg-grid {
    transform: none;
  }
}

/* === Print === */
@media print {
  .bg-grid {
    display: none;
  }
  .hero-title__typewriter::after {
    background: none;
  }
}
