/* ===== Joram Rusiana — Original Public Portfolio Design ===== */
* { box-sizing: border-box; }

:root {
  --color-accent: #0d9488;
  --color-accent-dark: #0b766c;
  --color-accent-soft: #d9f2ef;
  --color-ink: #1c2128;
  --color-ink-light: #2a303a;
  --color-bg: #f7f8f9;
  --color-bg-alt: #eef0f1;
  --color-surface: #ffffff;
  --color-text: #191c1f;
  --color-text-muted: #5a5f66;
  --color-border: #e1e4e6;
  --color-header-bg: var(--color-ink);
  --color-header-text: #f5f6f7;
  --shadow: 0 10px 30px rgba(28, 33, 40, 0.08);
}

[data-theme="dark"] {
  --color-accent: #2dd4bf;
  --color-accent-dark: #14b8a6;
  --color-accent-soft: #10322f;
  --color-ink: #0c0f13;
  --color-ink-light: #171b21;
  --color-bg: #0b0d10;
  --color-bg-alt: #121519;
  --color-surface: #161a1f;
  --color-text: #e7e9ea;
  --color-text-muted: #9a9fa6;
  --color-border: #262b31;
  --color-header-bg: #0c0f13;
  --color-header-text: #f5f6f7;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

html { height: 100%; scroll-behavior: smooth; }
body {
  display: flex;
  min-height: 100vh;
  height: 100%;
  flex-direction: column;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  transition: background .2s ease, color .2s ease;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
img { display: block; max-width: 100%; }
a { color: var(--color-accent); }
h1, h2, h3 { margin-top: 0; font-family: Arial, Helvetica, sans-serif; letter-spacing: -.01em; }
section { padding: 64px 0; border-bottom: 1px solid var(--color-border); }
main { display: block; flex: 1 0 auto; }
.page-header { padding: 56px 24px 8px; }
.page-header h1 { font-size: 2.1rem; }
.page-header p { max-width: 560px; color: var(--color-text-muted); }

/* Header and navigation */
body > header { position: sticky; top: 0; z-index: 50; padding: 16px 0; border-bottom: 3px solid var(--color-accent); background: var(--color-header-bg); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.logo { color: var(--color-header-text); font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.logo::before { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--color-accent); content: ""; }
nav ul { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
nav a { position: relative; padding-bottom: 4px; color: var(--color-header-text); font-size: .92rem; font-weight: 500; letter-spacing: .02em; opacity: .75; text-decoration: none; }
nav a::after { position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--color-accent); content: ""; transition: width .2s ease; }
nav a:hover, nav a.active { opacity: 1; }
nav a:hover::after, nav a.active::after { width: 100%; }
.nav-controls { display: flex; align-items: center; gap: 10px; }
#theme-toggle, #nav-toggle { height: 38px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; background: rgba(255,255,255,.08); color: var(--color-header-text); font-size: .85rem; font-weight: 600; line-height: 1; cursor: pointer; }
#theme-toggle:hover, #nav-toggle:hover { background: rgba(255,255,255,.18); }
#nav-toggle { display: none; }

/* Hero */
.hero-grid { display: flex; align-items: center; gap: 40px; }
.hero-grid img, .hero-image img { width: 200px; border: 3px solid var(--color-accent); border-radius: 12px; }
.hero-text h1, .hero-content h1 { margin-bottom: 6px; font-size: 2.1rem; }
.hero-role { margin: 4px 0 18px; font-size: 1.15rem; }
#typing-role { color: var(--color-accent); font-weight: 700; }
#typing-role::after { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: var(--color-accent); content: ""; vertical-align: text-bottom; animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc, .hero-content > p { max-width: 480px; color: var(--color-text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.hero-eyebrow { color: var(--color-accent); font-weight: 700; }

/* Buttons */
.btn { display: inline-block; padding: 13px 26px; border: 2px solid transparent; border-radius: 999px; background: var(--color-accent); color: #fff; font-size: .95rem; font-weight: 600; text-decoration: none; }
.btn-accent, .btn { background: var(--color-accent); color: #fff; }
.btn-accent:hover, .btn:hover { background: var(--color-accent-dark); }
.btn-outline { border: 2px solid var(--color-border); background: transparent; color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-accent); background: transparent; color: var(--color-accent); }

/* About */
.about-grid { display: flex; flex-wrap: wrap; gap: 36px; }
.about-grid > div { flex: 1 1 300px; }
.about-image img { width: 100%; max-width: 320px; border: 3px solid var(--color-accent); border-radius: 12px; }
.info-card { margin-bottom: 16px; padding: 22px; border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent); border-radius: 10px; background: var(--color-surface); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.skill-card { padding: 24px 20px; border: 1px solid var(--color-border); border-top: 3px solid var(--color-accent); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow); text-align: left; }
.skill-level-bar { margin-top: 10px; }
.skill-level-bar .bar-label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: .85rem; font-weight: 500; }
.progress-track { width: 100%; height: 8px; overflow: hidden; border-radius: 4px; background: #e0e0e0; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--color-accent); }
[data-theme="dark"] .progress-track { background: #334155; }

/* Resume */
.edu-card { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; padding: 22px; border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow); }
.timeline { margin: 0; padding: 0; border-left: 3px solid var(--color-accent); list-style: none; }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li::before { position: absolute; top: 4px; left: -9px; width: 14px; height: 14px; border: 2px solid var(--color-accent); border-radius: 50%; background: var(--color-ink); content: ""; }
[data-theme="dark"] .timeline li::before { background: var(--color-bg); }
.timeline h3 { margin-bottom: 4px; font-size: 1.05rem; }
.timeline span { color: var(--color-accent); font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.resume-date { color: var(--color-text-muted); }
.achievement-image { width: min(100%, 360px); max-height: 260px; margin-top: 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); object-fit: contain; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.project-card { overflow: hidden; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow); transition: transform .15s ease; }
.project-card:hover { transform: translateY(-4px); }
.project-card figure { margin: 0; }
.project-card figcaption { padding: 18px; }
.project-card h3 { font-size: 1.08rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tech-tags li { padding: 3px 12px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-accent-soft); color: var(--color-accent-dark); font-size: .78rem; font-weight: 600; }
[data-theme="dark"] .tech-tags li { color: var(--color-accent); }

/* Contact */
.contact-grid { display: flex; flex-wrap: wrap; gap: 36px; }
.contact-info { flex: 1 1 250px; }
form#contact-form { display: flex; flex: 1 1 320px; flex-direction: column; gap: 4px; padding: 24px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow); }
form#contact-form .field { margin-bottom: 12px; }
label { font-size: .88rem; font-weight: 600; }
input, textarea { width: 100%; margin-top: 4px; padding: 11px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-bg); color: var(--color-text); font: 1rem inherit; }
input:focus, textarea:focus { outline: none; border-color: var(--color-accent); }
textarea { min-height: 100px; resize: vertical; }
.error-text { min-height: 1.1em; display: block; color: #d1453d; font-size: .82rem; }
input.invalid, textarea.invalid { border-color: #d1453d; }
#form-success { display: none; margin-bottom: 14px; padding: 12px 16px; border: 1px solid #bfe6cb; border-radius: 8px; background: #e6f4ea; color: #1f7a3d; }
#form-success.show { display: block; }
button { align-self: flex-start; padding: 13px 24px; border: none; border-radius: 999px; background: var(--color-ink); color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; }
button:hover { background: var(--color-accent); }

/* Footer and utility */
body > footer { flex-shrink: 0; padding: 26px 0; background: var(--color-ink); color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.footer-inner p { margin: 0; color: rgba(255,255,255,.6); font-size: .88rem; }
.social-links { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.social-links a { color: #fff; font-size: .9rem; opacity: .8; text-decoration: none; }
.social-links a:hover { color: var(--color-accent); opacity: 1; }
#scroll-top-btn { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: none; width: 46px; height: 46px; border: 2px solid var(--color-accent); border-radius: 12px; background: var(--color-ink); color: #fff; font-size: 1.2rem; box-shadow: var(--shadow); cursor: pointer; }
#scroll-top-btn.show { display: block; }
#scroll-top-btn:hover { border-color: var(--color-accent); background: var(--color-accent); }

@media (max-width: 700px) {
  .hero-grid { flex-direction: column; text-align: center; }
  .hero-desc, .hero-content > p { margin-right: auto; margin-left: auto; }
  .hero-actions { justify-content: center; }
  #nav-toggle { display: inline-block; }
  nav { width: 100%; }
  nav ul { max-height: 0; flex-direction: column; gap: 0; overflow: hidden; transition: max-height .25s ease; }
  nav.open ul { max-height: 320px; padding: 10px 0; }
  nav ul li { padding: 10px 0; }
  .nav-inner { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; text-align: center; }
  .page-header, .contact-grid { padding-right: 20px; padding-left: 20px; }
}
