:root {
  --bg: #0a0e14;
  --bg2: #111722;
  --fg: #d6deeb;
  --muted: #7f8ea3;
  --accent: #3ddc97;
  --accent2: #56b6f7;
  --border: #1f2a3a;
  --mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

#bg { position: fixed; inset: 0; z-index: -1; opacity: .5; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem; backdrop-filter: blur(10px); background: rgba(10,14,20,.7); border-bottom: 1px solid var(--border); font-family: var(--mono); }
.logo { color: var(--accent); font-weight: bold; }
.nav nav a { margin-left: 1.5rem; color: var(--muted); font-size: .9rem; transition: color .2s; }
.nav nav a:hover { color: var(--accent); }

.lang-switch { display: flex; align-items: center; gap: .3rem; color: var(--border); font-size: .85rem; }
.lang-switch button { background: none; border: none; cursor: pointer; font-family: var(--mono); color: var(--muted); padding: .2rem .3rem; }
.lang-switch button:hover { color: var(--fg); }
.lang-switch button.active { color: var(--accent); }
.nav nav { margin-left: auto; margin-right: 1.5rem; }

.about p { margin-bottom: 1rem; max-width: 680px; }
.points { margin: .6rem 0 0 1.1rem; color: var(--muted); font-size: .95rem; }
.points li { margin-bottom: .3rem; }
.points li::marker { color: var(--accent); }

/* layout */
main { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 6rem 0 2rem; }
h3 { font-family: var(--mono); font-size: 1.6rem; margin-bottom: 2rem; }
h3::after { content: ""; display: inline-block; width: 30%; height: 1px; background: var(--border); margin-left: 1rem; vertical-align: middle; }

/* hero */
.hero { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.1; margin: .5rem 0; }
.typed { font-size: clamp(1.2rem, 3vw, 1.8rem); color: var(--accent2); min-height: 2.4rem; }
.caret { animation: blink 1s steps(1) infinite; color: var(--accent); margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
#pitch { max-width: 560px; margin: 1rem 0 2rem; font-size: 1.1rem; }
.hint { margin-top: 2.5rem; font-size: .85rem; }
kbd { border: 1px solid var(--border); border-radius: 4px; padding: 0 .4rem; color: var(--accent); }

.cta { display: flex; gap: 1rem; flex-wrap: wrap; }
#links { margin-top: 1.5rem; }
.btn { font-family: var(--mono); padding: .75rem 1.4rem; border: 1px solid var(--accent); border-radius: 6px; color: var(--bg); background: var(--accent); transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(61,220,151,.3); }
.btn.ghost { background: transparent; color: var(--accent); }

/* timeline */
.timeline { list-style: none; border-left: 2px solid var(--border); padding-left: 2rem; }
.timeline > li { position: relative; margin-bottom: 2.5rem; }
.timeline > li::before { content: ""; position: absolute; left: -2.45rem; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 10px var(--accent); }
.period { font-family: var(--mono); font-size: .85rem; color: var(--accent2); }
.timeline h4 { font-size: 1.15rem; }
.timeline h4 span { color: var(--accent); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.skill-group h4 { font-family: var(--mono); color: var(--muted); font-weight: normal; margin-bottom: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font-family: var(--mono); font-size: .8rem; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg2); transition: border-color .2s, color .2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; transition: transform .3s, border-color .3s; transform-style: preserve-3d; }
.card:hover { border-color: var(--accent); }
.card h4 { font-family: var(--mono); color: var(--accent); margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.card .chips .chip { font-size: .7rem; }

.edu { list-style: none; }
.edu li { margin-bottom: 1rem; }

footer { text-align: center; padding: 4rem 1rem 2rem; font-size: .8rem; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* terminals */
.term { background: #1e1e1e; border: 1px solid #000; border-radius: 8px 8px 4px 4px; box-shadow: 0 20px 60px rgba(0,0,0,.6); font-family: var(--mono); overflow: hidden; }
/* GNOME / Ubuntu style title bar: centered title, controls on the right */
.term-bar { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 2.3rem; padding: 0 .5rem; background: #2b2b2b; border-bottom: 1px solid #111; }
.term-bar em { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; font-style: normal; font-weight: bold; font-family: var(--sans); font-size: .8rem; color: #ddd; }
.win-btns { position: relative; display: flex; gap: .55rem; }
.win-btns button { width: 1.25rem; height: 1.25rem; border: none; border-radius: 50%; background: #3d3d3d; cursor: pointer; display: grid; place-items: center; padding: 0; }
.win-btns button:hover { background: #4d4d4d; }
.win-btns .win-close { background: #e95420; }
.win-btns .win-close:hover { background: #f26b3a; }
.win-btns svg { width: .6rem; height: .6rem; fill: none; stroke: #fff; stroke-width: 1.4; }
.prompt b { color: #8ae234; }
.neofetch > div { white-space: normal; }
.neofetch { display: flex; gap: 1.5rem; align-items: flex-start; margin: .3rem 0; }
.neo-logo { margin: 0; color: #e9b96e; }
.neo-color { display: inline-block; width: 1.6rem; height: 1rem; }
.neo-key { color: #8ae234; }
.t-ok { color: #8ae234; font-weight: bold; }
.t-warn { color: #fcaf3e; font-weight: bold; }
.matrix { position: absolute; top: 2.3rem; left: 0; right: 0; bottom: 0; margin: 0; padding: .4rem; background: #000; color: #3ddc97; font-size: .85rem; line-height: 15px; overflow: hidden; text-shadow: 0 0 6px rgba(61,220,151,.6); }
#console-in:disabled { opacity: .4; }
.prompt i { color: #729fcf; font-style: normal; }

#intro { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: center; transition: opacity .6s; }
#intro.done { opacity: 0; pointer-events: none; }
#intro .term { width: min(680px, 92vw); animation: term-open .25s ease-out; }
#intro .term.off { display: none; }
@keyframes term-open { from { transform: scale(.94); opacity: 0; } }
#boot { position: absolute; inset: 0; margin: 0; padding: 1rem 1.2rem; background: #000; color: #c7c7c7; font-family: var(--mono); font-size: .85rem; line-height: 1.45; overflow: hidden; }
#boot .ok { color: #8ae234; font-weight: bold; }
#intro-text { padding: 1.2rem; min-height: 260px; color: var(--fg); white-space: pre-wrap; font-size: .9rem; }
#skip { position: absolute; bottom: 2rem; right: 2rem; background: none; border: 1px solid var(--border); color: var(--muted); font-family: var(--mono); padding: .4rem .9rem; border-radius: 6px; cursor: pointer; }
#skip:hover { color: var(--accent); border-color: var(--accent); }

#console { position: fixed; bottom: 1.5rem; right: 1.5rem; width: min(520px, 92vw); height: 320px; z-index: 50; display: flex; flex-direction: column; transition: transform .3s, opacity .3s; }
#console.maximized { top: 5rem; left: 1.5rem; width: auto; height: auto; }
#intro .term.maximized { width: 96vw; }
#intro .term.maximized #intro-text { min-height: 80vh; }
#console.hidden { transform: translateY(30px); opacity: 0; pointer-events: none; }
#console-out { flex: 1; overflow-y: auto; padding: .8rem; font-size: .85rem; white-space: pre-wrap; }
.console-line { display: flex; gap: .5rem; padding: 0 .8rem .8rem; font-size: .85rem; }
#console-in { flex: 1; background: none; border: none; outline: none; color: var(--fg); font-family: var(--mono); font-size: .85rem; }

@media (max-width: 640px) {
  .nav nav { display: none; }
  section { padding-top: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
