/* Minimal personal landing, no frameworks */

:root {
  --bg: #0b0d12;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #ffb454;
  --accent-2: #ff6a7a;
  --shadow: 0 16px 60px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(255, 180, 84, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: none;
  border: none;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans",
    "Liberation Sans", sans-serif;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(255, 180, 84, 0.16), transparent 60%),
    radial-gradient(1000px 600px at 85% 15%, rgba(255, 106, 122, 0.12), transparent 60%), var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.container {
  width: min(1024px, calc(100% - 48px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 18, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.hero {
  padding: 72px 0 40px;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.95), rgba(255, 106, 122, 0.85), rgba(255, 255, 255, 0.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 0 22px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section {
  padding: 42px 0;
}

.section-title {
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 18px;
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.will-reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  pointer-events: none;
  background: radial-gradient(600px 140px at 20% 0%, rgba(255, 180, 84, 0.10), transparent 60%),
    radial-gradient(600px 140px at 80% 0%, rgba(255, 106, 122, 0.08), transparent 60%);
  opacity: 0.7;
}

.lead {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.muted {
  color: var(--muted);
}

.bullets {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.bullets li {
  margin: 0.35rem 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.contacts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.contact:hover {
  border-color: rgba(255, 180, 84, 0.4);
  text-decoration: none;
}

.contact-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color: var(--text);
}

.contact-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.contact-btn:active {
  transform: translateY(0);
}

.contact-btn:focus-visible {
  box-shadow: var(--ring);
  border-color: rgba(255, 180, 84, 0.35);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(560px, calc(100% - 40px));
  margin: 10vh auto;
  background: rgba(15, 17, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-weight: 750;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  line-height: 1;
  font-size: 18px;
}

.modal-close:hover {
  border-color: rgba(255, 180, 84, 0.35);
}

.modal-body {
  padding: 16px 18px;
  color: rgba(255, 255, 255, 0.86);
}

.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-row:last-child {
  border-bottom: none;
}

.modal-key {
  color: rgba(255, 255, 255, 0.60);
  font-size: 0.9rem;
}

.modal-value {
  font-weight: 650;
  word-break: break-word;
  text-align: right;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 650;
  font-size: 0.95rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.button.primary {
  border-color: rgba(255, 180, 84, 0.35);
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.22), rgba(255, 106, 122, 0.12));
}

.button.small {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.footer-note {
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* YouTube Downloader Styles */
.youtube-downloader {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.youtube-input-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

.youtube-input {
  flex: 1;
  min-width: 300px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  height: auto;
  min-height: 44px;
  transition: border-color 180ms ease, background 180ms ease;
  box-sizing: border-box;
}

.youtube-input-group .button {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 120px;
}

.youtube-input:focus {
  outline: none;
  border-color: rgba(255, 180, 84, 0.35);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--ring);
}

.youtube-input::placeholder {
  color: var(--muted);
}

.youtube-video-info {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.youtube-thumbnail-container {
  flex-shrink: 0;
}

.youtube-thumbnail {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.youtube-info-text {
  flex: 1;
  min-width: 0;
}

.youtube-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
  word-wrap: break-word;
}

.youtube-formats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.youtube-formats-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.youtube-format-select {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.youtube-format-select:focus {
  outline: none;
  border-color: rgba(255, 180, 84, 0.35);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--ring);
}

.youtube-format-select option {
  background: var(--bg);
  color: var(--text);
}

.youtube-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.youtube-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.youtube-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.youtube-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: width 300ms ease;
  width: 0%;
}

.youtube-progress-text {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text);
  min-width: 45px;
  text-align: right;
}

.youtube-status-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.youtube-error {
  padding: 12px 16px;
  background: rgba(255, 106, 122, 0.15);
  border: 1px solid rgba(255, 106, 122, 0.3);
  border-radius: 12px;
  color: var(--accent-2);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .youtube-video-info {
    flex-direction: column;
  }
  
  .youtube-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  
  .youtube-input-group {
    flex-direction: column;
  }
  
  .youtube-input {
    min-width: 100%;
    width: 100%;
  }
  
  .youtube-input-group .button {
    width: 100%;
    min-width: 100%;
  }
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 12px;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Modal Styles */
.admin-modal-card {
/* Admin Modal Styles - Fixed version */
.admin-modal-card {
  max-width: 95vw !important;
  width: 95vw !important;
  max-height: 90vh !important;
}

.admin-modal-body {
  padding: 0 !important;
  overflow: hidden !important;
  height: 80vh !important;
  background: #ffffff !important;
  position: relative;
}

.admin-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0 0 12px 12px;
  display: none;
}

.admin-modal iframe.loaded {
  display: block;
}

/* Loader */
.admin-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  z-index: 10;
}

.admin-loader.hidden {
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-loader p {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
