/* Main CSS for Sorin R Portfolio Website */
/* This file styles the desktop and general layout */

/* Basic reset and font setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
    padding-top: 115px; /* Space for fixed header */
}

/* Toggle dark mode styles */
body.dark {
    background-color: #333;
    color: #eee;
}

body.dark #hero {
    background-color: #444;
    color: #ffffff;
}

body.dark #hero p {
    color: #ddd;
}

body.dark .profile-img {
    border: 3px solid #eee;
}

body.dark h3 {
    color: #eee;
}

body.dark #projects p {
    color: #eee;
}

body.dark .about-text h1 {
    color: #eee;
}

body.dark header,
body.dark footer {
    background-color: #222;
}

body.dark #projects {
    background-color: #333;
    color: #eee;
}

body.dark .project {
    background-color: #0f0f0f;
    color: #eee;
}

body.dark a {
    color: #eee;
}

#mode-toggle {
    margin-left: 1rem;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

#mode-toggle:hover {
    background: #555;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container keeps content centered and readable */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

/* Header section styling */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    padding: 1.2rem 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(34, 34, 34, 0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
    pointer-events: none;
}

/* Using flexbox to place nav on left and name on right */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

header p {
    font-size: 1.1rem;
    color: #ccc;
}

.header-info a {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

/* Navigation menu inside the header */
nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
    color: #62a1e0;
}

/* Burger button — hidden on desktop */
#burger {
    display: none;
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    font-size: 2.8rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
}

/* Slide-out nav menu (mobile) */
#nav-menu {
    transition: transform 0.3s ease-in-out;
}

/* Add a class for when the menu is open */
#nav-menu.open {
    transform: translateX(0);
}

/* Hero section with intro text and image */
#hero {
    background-color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #222;
    cursor: pointer;
}

/* Add a subtle animation when the profile image is clicked */
.profile-img.active {
    transform: scale(1.1);
    border: 3px solid #62a1e0;
    box-shadow: 0 0 15px #62a1e0;
    transition: all 0.3s ease;
}

#hero h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

#hero p {
    color: #555;
}

/* Featured Projects section */
#projects {
    background-color: #f0f0f0;
    padding: 3rem 0;
    align-items: center;
}

#projects h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

#projects p {
    text-align: center;
    margin-bottom: 2rem;
    color: #555;
}

/* Each project card */
.project {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Image on the left side of each project */
.project img {
    width: 40%;
    margin: 20px;
    object-fit: cover;
}

/* Text content for each project */
.project-details {
    padding: 1.5rem;
}

.project-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: #222;
}

.project-details p {
    margin-bottom: 0.8rem;
    color: #555;
}

/* Buttons for project links */
.project-details a {
    display: inline-block;
    margin-right: 10px;
    padding: 8px 14px;
    border-radius: 4px;
    background-color: #222;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.project-details a:hover {
    background-color: #555;
}

/* About Section */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 2rem;
    height: 100vh;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    max-width: 1000px;
    gap: 2rem;
    align-items: center;
}

.about-text {
    flex: 1 1 400px;
}

.about-text h1 {
    font-size: 2.5rem;
    color: #111;
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-text .btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #62a1e0;
    color: #fff;
    border-radius: 5px;
    transition: background 0.3s;
    margin-top: 1rem;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    text-align: center;
}

.about-text .btn:hover {
    background: #008fcc;
}

.about-image {
    flex: 1 1 300px;
    text-align: center;
}

.about-image img {
    width: 250px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Contact section */
#contact {
    margin-top: 1.5rem;
}

#contact a {
    color: #62a1e0;
    text-decoration: none;
}

main .container {
    margin-bottom: 2rem;
}

#form {
    max-width: 40rem;
    margin: 0 auto;
}

form {
    background: #222;
    padding: 2rem 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    width: auto;
    margin-bottom: 1.5rem;
}

form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #fff;
}

input,
textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: #f9fafb;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
    border-color: #62a1e0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}

form button {
    width: 100%;
    padding: 0.85rem;
    background: #62a1e0;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
}

form button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

form button:active {
    transform: translateY(0);
}

/* Scroll-to-top button s*/
#scrollTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px; /* Equal width & height make it a perfect circle */
    height: 60px;
    background: #62a1e0;
    color: #fff;
    border: none;
    border-radius: 50%; /* Perfect circle */
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease;
    z-index: 2000;
    display: flex; /* Center the arrow perfectly */
    align-items: center;
    justify-content: center;
}

#scrollTop.show {
    opacity: 1;
    pointer-events: all;
}

#scrollTop:hover {
    background: #1d4ed8;
    transform: scale(1.1); /* Subtle hover grow */
}

/* Arrow inside the button */
.arrow {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

#scrollTop.show {
    opacity: 1;
    pointer-events: all;
}

#scrollTop:hover {
    background: #1d4ed8;
}

/* Footer section at the bottom */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
}

footer a {
    color: #9acdff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.social-links {
    list-style: none;
    margin-top: 1rem;
}

.social-links li {
    display: inline;
    margin: 0 10px;
}
