:root {
  --primary: #00aaff;
  --primary-light: #33bbff;
  --secondary: #0080cc;
  --dark: #0a0a0a;
  --darker: #050505;
  --light: #e0e0e0;
  --text: #f0f0f0;
  --accent: #ff6b35;
  --code-bg: #1a1a1a;
  --card-bg: rgba(15, 20, 25, 0.8);
  --card-border: rgba(0, 170, 255, 0.2);
  --card-shadow: 0 8px 32px rgba(0, 170, 255, 0.1);
  --grid-line: rgba(0, 170, 255, 0.08);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --text-gradient: linear-gradient(90deg, var(--primary), var(--secondary));
  --bg-gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

@media (prefers-color-scheme: light) {
  :root {
    --primary: #0066cc;
    --primary-light: #0080ff;
    --secondary: #004499;
    --dark: #f8f9fa;
    --darker: #e9ecef;
    --light: #343a40;
    --text: #212529;
    --accent: #e67e22;
    --code-bg: #f1f3f4;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 102, 204, 0.25);
    --card-shadow: 0 8px 32px rgba(0, 102, 204, 0.12);
    --grid-line: rgba(0, 102, 204, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --text-gradient: linear-gradient(90deg, var(--primary), var(--secondary));
    --bg-gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--dark);
  background-image: 
    linear-gradient(rgba(0, 170, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 170, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  position: relative;
}

@media (prefers-color-scheme: light) {
  body {
    background-image: 
      linear-gradient(rgba(0, 102, 204, 0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 102, 204, 0.06) 1px, transparent 1px);
  }
}

#wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

#header {
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
}

.logo {
  display: inline-block;
  margin-bottom: 2rem;
}

.logo img {
  width: 80px;
  height: auto;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
  filter: drop-shadow(0 0 5px var(--primary));
}

@media (prefers-color-scheme: light) {
  .logo img {
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.3);
    filter: drop-shadow(0 0 3px rgba(0, 102, 204, 0.4));
    border-color: var(--primary);
  }
}

.content .inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  backdrop-filter: blur(8px);
  box-shadow: var(--card-shadow);
  transform: translateY(0);
  transition: var(--transition);
  animation: fadeInUp 1s ease 0.3s both;
  position: relative;
  overflow: hidden;
}

.content .inner::before {
  content: "$ ./welcome.sh";
  display: block;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.7;
  text-align: left;
}

.content .inner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.content .inner:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 170, 255, 0.15);
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: scaleIn 1.2s ease 0.7s both;
  text-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
  letter-spacing: -1px;
}

.content p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 1s ease 1s both;
  position: relative;
  padding-left: 20px;
  text-align: left;
}

.content p::before {
  content: ">";
  position: absolute;
  left: -40px;
  color: var(--primary);
}

nav {
  margin-top: 3rem;
  animation: fadeInUp 1s ease 1.2s both;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav ul li {
  list-style: none;
}

nav ul li a {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  letter-spacing: -0.5px;
}

nav ul li a:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 170, 255, 0.2), transparent);
  transition: var(--transition);
  z-index: -1;
}

nav ul li a:hover {
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 170, 255, 0.3);
  border-color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
}

nav ul li a:hover:before {
  left: 100%;
  transition: 0.5s;
}

nav ul li:nth-child(odd) a {
  animation: fadeInLeft 1.2s ease-out;
}

nav ul li:nth-child(even) a {
  animation: fadeInRight 1.2s ease-out;
}

#main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-grow: 1;
}

article {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  padding: 2.5rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

article::before {
  content: "/* about.js */";
  display: block;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.7;
  text-align: left;
}

article::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary), transparent);
}

article:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 0 15px rgba(0, 170, 255, 0.1);
}

h2.major {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

h2.major:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

article p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  position: relative;
  padding-left: 20px;
}

article p::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--primary);
}

#footer {
  padding: 2rem;
  text-align: center;
  background: rgba(10, 10, 10, 0.8);
  border-top: 1px solid var(--card-border);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (prefers-color-scheme: light) {
  #footer {
    background: rgba(248, 249, 250, 0.95);
    border-top: 1px solid rgba(0, 102, 204, 0.15);
  }
  
  .copyright {
    color: #6c757d;
    opacity: 0.85;
  }
}

.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background-color: var(--primary);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@media screen and (max-width: 980px) {
  h1 { font-size: 2.5rem; }
  .content .inner { padding: 1.5rem; }
}

@media screen and (max-width: 736px) {
  h1 { font-size: 2rem; }
  nav ul { flex-direction: column; align-items: center; }
  nav ul li { width: 100%; }
  nav ul li a { width: 100%; text-align: center; }
}

@media screen and (max-width: 480px) {
  #header { padding: 2rem 1rem; }
  h1 { font-size: 1.75rem; }
  .content p { font-size: 1rem; }
  #main { padding: 1rem; }
  article { padding: 1.5rem; }
}

nav ul li a.icon-user {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  padding-left: 40px;
}

nav ul li a.icon-code {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'%3E%3C/polyline%3E%3Cpolyline points='8 6 2 12 8 18'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  padding-left: 40px;
}

nav ul li a.icon-home {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9,22 9,12 15,12 15,22'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  padding-left: 40px;
}

@media (prefers-color-scheme: light) {
  nav ul li a.icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23343a40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
  }
  
  nav ul li a.icon-code {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23343a40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'%3E%3C/polyline%3E%3Cpolyline points='8 6 2 12 8 18'%3E%3C/polyline%3E%3C/svg%3E");
  }
  
  nav ul li a.icon-home {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23343a40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9,22 9,12 15,12 15,22'%3E%3C/polyline%3E%3C/svg%3E");
  }
}

nav ul li a {
  position: relative;
  overflow: hidden;
}

nav ul li a::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 170, 255, 0.2), transparent);
  transition: 0.5s;
}

nav ul li a:hover::after {
  left: 100%;
}

body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300aaff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'%3E%3C/polygon%3E%3C/svg%3E") 0 0, auto;
}

a, button, input[type="button"], input[type="submit"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300aaff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 14a8 8 0 0 1-8 8'%3E%3C/path%3E%3Cpath d='M18 11v-1a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v0'%3E%3C/path%3E%3Cpath d='M14 10V9a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v1'%3E%3C/path%3E%3Cpath d='M10 9.5V4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v10'%3E%3C/path%3E%3Cpath d='M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'%3E%3C/path%3E%3C/svg%3E") 0 0, pointer;
}

@media (prefers-color-scheme: light) {
  body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'%3E%3C/polygon%3E%3C/svg%3E") 0 0, auto;
  }
  
  a, button, input[type="button"], input[type="submit"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 14a8 8 0 0 1-8 8'%3E%3C/path%3E%3Cpath d='M18 11v-1a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v0'%3E%3C/path%3E%3Cpath d='M14 10V9a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v1'%3E%3C/path%3E%3Cpath d='M10 9.5V4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v10'%3E%3C/path%3E%3Cpath d='M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'%3E%3C/path%3E%3C/svg%3E") 0 0, pointer;
  }
}

#about {
  display: none;
}

#about.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

#about h2 { animation: fadeInUp 0.8s ease 0.2s both; }
#about p { animation: fadeInUp 0.8s ease; }
#about p:nth-child(2) { animation-delay: 0.3s; }
#about p:nth-child(3) { animation-delay: 0.4s; }
#about p:nth-child(4) { animation-delay: 0.5s; }
#about p:nth-child(5) { animation-delay: 0.6s; }
#about p:nth-child(6) { animation-delay: 0.7s; }

.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--primary);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

.code-line {
  position: relative;
  padding-left: 3.5em;
  text-align: left;
}

.code-line::before {
  content: attr(data-line);
  position: absolute;
  left: 0;
  color: rgba(0, 170, 255, 0.5);
  text-align: right;
  width: 3em;
  padding-right: 0.5em;
  pointer-events: none;
  z-index: 1;
}

.terminal-prompt {
  position: relative;
  padding-left: 2em;
}

.terminal-prompt::before {
  content: "> ";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: -20px;
  z-index: 1;
  pointer-events: none;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background-color: var(--primary);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

#footer a {
  color: var(--light);
  text-decoration: none;
  opacity: 0.7;
  transition: var(--transition);
}

#footer a:hover {
  color: var(--primary);
  opacity: 1;
}

@media (prefers-color-scheme: light) {
  #footer a {
    color: #6c757d;
    opacity: 0.8;
  }
  
  #footer a:hover {
    color: var(--primary);
    opacity: 1;
  }
}