:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.46);
  --panel-border: rgba(255, 255, 255, 0.09);
  --card-bg: rgba(2, 6, 23, 0.24);
  --card-border: rgba(51, 65, 85, 0.46);
  --text: #e2e8f0;
  --heading: #ffffff;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --focus: #7dd3fc;
  --success: #34d399;
  --radius-large: 1.5rem;
  --radius-medium: 1rem;
  --shadow: 0 28px 75px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.85rem;
  color: #082f49;
  background: #e0f2fe;
  border-radius: 0.5rem;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

#background-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--page-bg);
}

.site-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 1rem;
  overflow-x: hidden;
}

.site-header,
.site-footer {
  width: min(100%, 56rem);
  margin-inline: auto;
}

.site-header {
  min-height: 2rem;
}

.main-content {
  display: grid;
  place-items: center;
  padding: 2.5rem 0;
}

.portfolio-card {
  position: relative;
  width: min(100%, 28rem);
  padding: clamp(2rem, 6vw, 2.5rem);
  overflow: hidden;
  text-align: center;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: card-enter 700ms ease-out both;
}

.card-glow {
  position: absolute;
  top: -5rem;
  left: 50%;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.13);
  filter: blur(30px);
  transform: translateX(-50%);
  pointer-events: none;
}

.status-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0.38rem 0.8rem;
  color: var(--accent);
  background: rgba(8, 47, 73, 0.42);
  border: 1px solid rgba(14, 116, 144, 0.42);
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent-strong);
  border-radius: 50%;
}

.status-dot::before {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--accent);
  border-radius: inherit;
  animation: status-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

h1 {
  position: relative;
  margin: 0 0 0.75rem;
  color: var(--heading);
  font-family: Outfit, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.9rem, 8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.intro {
  max-width: 20rem;
  margin: 0 auto 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-list {
  display: grid;
  gap: 0.75rem;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.85rem;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-medium);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.contact-link:hover {
  background: rgba(2, 6, 23, 0.36);
  border-color: rgba(14, 165, 233, 0.55);
  transform: translateY(-1px);
}

.contact-details {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.icon-box {
  display: grid;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.88);
  border-radius: 0.75rem;
  transition: color 180ms ease, background 180ms ease;
}

.icon-box svg {
  width: 1rem;
  height: 1rem;
}

.contact-card:hover .icon-box {
  color: var(--accent);
  background: rgba(8, 47, 73, 0.48);
}

.contact-copy {
  display: block;
  min-width: 0;
  text-align: left;
}

.contact-label {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--faint);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.contact-copy a,
.contact-value {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 180ms ease;
}

.contact-copy a:hover,
.contact-link:hover .contact-value {
  color: var(--accent);
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 0.55rem;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.icon-button:hover {
  color: var(--heading);
  background: #1e293b;
  border-color: #475569;
}

.icon-button svg,
.external-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.icon-button .check-icon {
  display: none;
  color: var(--success);
}

.icon-button.is-copied .copy-icon {
  display: none;
}

.icon-button.is-copied .check-icon {
  display: block;
}

.external-icon {
  flex: 0 0 auto;
  padding: 0.5rem;
  color: var(--faint);
  transition: color 180ms ease;
}

.contact-link:hover .external-icon {
  color: var(--accent);
}

.site-footer {
  padding: 1rem 0;
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.noscript-message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 10;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  color: #e2e8f0;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-ping {
  70%, 100% {
    opacity: 0;
    transform: scale(2.3);
  }
}

@media (min-width: 40rem) {
  .site-shell {
    padding: 1.5rem;
  }
}

@media (max-width: 25rem) {
  .portfolio-card {
    padding-inline: 1.25rem;
  }

  .contact-copy a,
  .contact-value {
    max-width: 12rem;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .portfolio-card {
    background: rgba(15, 23, 42, 0.94);
  }
}
