:root {
  --accent: #0088cc;
  --accent-soft: rgba(0, 136, 204, 0.14);
  --bg-grad-1: #1e293b;
  --bg-grad-2: #0088cc;
  --surface: #ffffff;
  --surface-alt: #f7f8fa;
  --text: #323232;
  --heading: #171717;
  --muted: #646464;
  --border: #eeeeee;
  --shadow: 0 15px 45px rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] {
  --bg-grad-1: #0f172a;
  --bg-grad-2: #0b4f75;
  --surface: #31313a;
  --surface-alt: #26262e;
  --text: rgba(255, 255, 255, 0.78);
  --heading: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', system-ui, sans-serif; color: var(--text); font-size: 15px; line-height: 1.65; overflow-x: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* RyanCV Gradient Background */
.page_wrap { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.background.gradient { position: fixed; inset: 0; z-index: -1; background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%); }

/* Main Centered Container */
.container.opened { position: relative; width: 100%; max-width: 1268px; height: 84vh; min-height: 620px; display: flex; align-items: stretch; }

/* Left Vertical Header Menu */
.header { width: 76px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; margin-right: 12px; z-index: 20; }
.top-controls { background: var(--surface); border-radius: 4px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow); }
.lang-switch { display: flex; gap: 6px; font-size: 11px; font-weight: 700; }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a.active { color: var(--accent); }
.theme-btn { background: transparent; border: 1px solid var(--border); color: var(--heading); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.top-menu { background: var(--surface); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); }
.top-menu ul { list-style: none; }
.top-menu li a { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 11px 4px; text-decoration: none; color: var(--heading); border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 600; text-transform: uppercase; transition: color .2s; }
.top-menu li:last-child a { border-bottom: none; }
.top-menu li a .icon { font-size: 16px; margin-bottom: 2px; }
.top-menu li.active a, .top-menu li a:hover { color: var(--accent); }

/* Center-Left Profile Card (card-started) */
.card-started { position: relative; width: 440px; flex-shrink: 0; background: var(--surface); border-radius: 4px; box-shadow: var(--shadow); z-index: 10; overflow: hidden; display: flex; flex-direction: column; }
.card-started .profile { display: flex; flex-direction: column; justify-content: space-between; height: 100%; text-align: center; }
.card-started .profile-content { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 28px; }
.card-started .slide { position: absolute; top: 0; left: 0; right: 0; height: 52%; overflow: hidden; background: #0f172a; clip-path: polygon(0 0, 100% 0, 100% 84%, 50% 100%, 0 84%); }
.card-started .slide video { width: 100%; height: 100%; object-fit: cover; opacity: 0.72; }
.card-started .image { position: relative; z-index: 2; width: 142px; height: 142px; margin-bottom: 18px; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.22); overflow: hidden; background: var(--surface); }
.card-started .image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-started .title { font-size: 28px; font-weight: 600; color: var(--heading); line-height: 1.2; padding: 0 20px; }
.card-started .subtitle-typed { margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--accent); min-height: 24px; }
.card-started .social { margin-top: 16px; display: flex; gap: 12px; justify-content: center; }
.card-started .social a { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--heading); text-decoration: none; font-size: 12px; font-weight: 700; transition: all .2s; }
.card-started .social a:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.card-started .lnks { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.card-started .lnks .lnk { padding: 18px 10px; text-align: center; text-decoration: none; color: var(--heading); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-right: 1px solid var(--border); transition: color .2s; }
.card-started .lnks .lnk:last-child { border-right: none; }
.card-started .lnks .lnk:hover { color: var(--accent); }

/* Right Content Cards Viewport */
.cards-viewport { position: relative; flex: 1; margin: 14px 0; background: var(--surface); border-radius: 0 4px 4px 0; box-shadow: 0 10px 30px rgba(0,0,0,.1); overflow: hidden; }
.card-inner { position: absolute; inset: 0; overflow-y: auto; padding: 34px 32px; opacity: 0; visibility: hidden; transform: translateX(-18px); transition: opacity .3s ease, transform .3s ease, visibility .3s; }
.card-inner.active { opacity: 1; visibility: visible; transform: translateX(0); z-index: 5; }
.card-inner .content { margin-bottom: 34px; }
.card-inner .title { font-size: 20px; font-weight: 600; color: var(--heading); border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 20px; position: relative; }
.card-inner .title span { color: var(--accent); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-list ul { list-style: none; font-size: 13.5px; }
.info-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.info-list strong { color: var(--heading); }
.service-items, .grid-items { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.service-item, .box-item { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 4px; padding: 18px; }
.service-item .name, .box-item .name { font-size: 15px; font-weight: 600; color: var(--heading); text-decoration: none; display: block; margin-bottom: 6px; }
.box-item .name:hover { color: var(--accent); }
.box-item .category { font-size: 11px; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.resume-title { font-size: 15px; font-weight: 600; color: var(--heading); margin-bottom: 14px; text-transform: uppercase; }
.resume-item { border-left: 2px solid var(--border); padding-left: 14px; margin-bottom: 16px; }
.resume-item .date { display: inline-block; font-size: 11px; padding: 1px 8px; border: 1px solid var(--border); border-radius: 3px; color: var(--muted); margin-bottom: 4px; }
.resume-item .date.active { border-color: var(--accent); color: var(--accent); }
.resume-item .name { font-size: 14px; font-weight: 600; color: var(--heading); }
.resume-item .company { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.skills-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.skill-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.progress { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.percentage { height: 100%; background: var(--accent); }
.filter-menu { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 5px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.filter-btn.active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.front-form, .admin-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-alt); color: var(--heading); font-family: inherit; font-size: 13.5px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.button, .btn-primary { background: var(--accent); color: #fff; border: none; padding: 11px 20px; border-radius: 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; cursor: pointer; width: fit-content; text-decoration: none; display: inline-block; }
.btn-outline { border: 1px solid var(--border); color: var(--heading); padding: 8px 14px; border-radius: 4px; text-decoration: none; font-size: 13px; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--heading); cursor: pointer; }
.alert-success { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--heading); padding: 12px 16px; border-radius: 4px; margin-bottom: 18px; font-size: 13.5px; }

/* Admin Panel */
.admin-body { display: grid; place-items: start center; min-height: 100vh; padding: 24px; background: var(--surface-alt); }
.admin-card, .admin-panel { background: var(--surface); padding: 28px; border-radius: 6px; width: 100%; max-width: 1080px; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.admin-card { max-width: 380px; margin-top: 10vh; display: flex; flex-direction: column; gap: 12px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.admin-box { border: 1px solid var(--border); border-radius: 4px; padding: 16px; margin-bottom: 16px; }
.admin-box summary { cursor: pointer; font-weight: 600; color: var(--heading); }
.admin-box summary h2 { display: inline; font-size: 15px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--border); padding: 8px; text-align: left; }

@media (max-width: 1024px) {
  .container.opened { flex-direction: column; height: auto; }
  .header { width: 100%; flex-direction: row; justify-content: space-between; margin: 0 0 12px 0; }
  .top-menu ul { display: flex; flex-wrap: wrap; }
  .top-menu li a { border-bottom: none; border-right: 1px solid var(--border); padding: 8px 12px; }
  .card-started { width: 100%; margin-bottom: 12px; }
  .cards-viewport { margin: 0; border-radius: 4px; min-height: 460px; }
  .card-inner { position: relative; display: none; opacity: 1; visibility: visible; transform: none; }
  .card-inner.active { display: block; }
  .row-2, .service-items, .grid-items, .skills-list, .form-row { grid-template-columns: 1fr; }
}
