:root {
    --bg-primary: #1c1e26;
    --bg-secondary: #2d2e39;
    --bg-overlay: rgba(28, 30, 38, 0.7);
    --accent-primary: #64ffda;
    --accent-secondary: #fcac0f;
    --accent-tertiary: #ad5d28;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-primary: #444;
    --border-secondary: rgba(255, 255, 255, 0.1);
    --font-primary: Arial, sans-serif;
    --font-special: 'ToThePointRegular', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

html, body {
    height: 100%;
    overflow-x: hidden;
    background-color: var(--bg-primary);
}

/* Typography */
h1, h2, .projects-header, .expertise-header, .page-header, .name-heading {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-weight: bold;
}

h1, h2 {
    font-size: 35px;
    text-align: left;
}

li {
  color: var(--text-secondary);
}

.projects-header, .expertise-header, .page-header, .name-heading {
    font-size: 60px;
    margin: 30px 0 50px;
    text-align: center;
}

.name-heading {
    margin-top: 80px;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-size: 80px;
}

p, .font-fallback, .location, .job-period, .card-description, .contact-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.font-fallback {
    text-align: center;
    margin-top: 20px;
}

.projects-description, .subtitle {
    font-size: 20px;
    line-height: 1.5;
}

.projects-description {
    max-width: 300px;
    margin-bottom: 24px;
}
/* Added back projects grid styling */
.projects-grid {
    flex: 1 1 60%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 70%;
}

.projects-page .container {
    display: flex;
    min-height: 100vh;
}

.projects-page .main-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--bg-primary);
}

.screen-content{
    text-align: center;
    animation: screenGlow 4s ease-in-out infinite alternate;
    overflow: hidden;
    height: 100%;
    max-width: 100% !important;
    width: 100% !important;
    transform-origin: top center;
    margin-top: 150px !important;
}

.screen h3 {
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255,255,255,0.3);
}

.screen p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

.modal-description {
    line-height: 1.6;
    font-size: 15px;
}

.modal-description p {
    font-size: 15px;
    margin-bottom: 10px;
}

.modal-description ul {
    font-size: 15px;
    margin-top: 10px;
}

.modal-description li {
    font-size: 15px;
    margin-bottom: 6px;
}

@keyframes spin {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    25% { transform: rotateY(90deg) rotateX(5deg); }
    50% { transform: rotateY(180deg) rotateX(0deg); }
    75% { transform: rotateY(270deg) rotateX(-5deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}

.iphone-container:hover .iphone {
    animation-play-state: paused;
}

.subtitle {
    letter-spacing: 3px;
    font-weight: normal;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.nav-item {
    margin: 0 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    position: relative;
}

.nav-item s {
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.nav-number {
    color: var(--text-primary);
    font-size: 12px;
    margin-right: 5px;
}

.active, .nav-item.active {
    color: var(--accent-primary);
}

/* Components */
.container {
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    padding: 0;
    background-color: transparent;
}

.header, .main-content {
    padding: 15px 40px;
    color: var(--text-primary);
}

.main-content {
    min-height: calc(100vh - 50px);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cards & Tiles */
.project-tile, .modal-content, .experience-item, .expertise-card, .testimonial, .contact-form {
    border-radius: 8px;
    background-color: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.project-tile {
    height: 220px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.project-tile img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-title {
    text-align: center;
    font-size: 20px;
    padding: 10px;
}

/* Projects */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 900px;
    animation: modalfade 0.3s;
}

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

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #aaa;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-image {
    width: 100%;
    border-radius: 8px;
    max-height: 400px;
    object-fit: cover;
}

.modal-footer {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

.project-btn {
    background-color: var(--accent-secondary);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 20px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.project-btn:hover {
    background-color: var(--accent-secondary);
}

/* Experience Section */
.experience-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.experience-item {
    margin-bottom: 20px;
}

.experience-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--accent-tertiary);
    cursor: pointer;
    transition: background-color 0.3s;
}

.experience-header-bar:hover {
    background-color: var(--accent-tertiary);
}

.job-title {
    font-size: 16px;
    font-weight: 600;
}

.toggle-btn {
    color: var(--text-primary);
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.experience-content {
    background-color: rgba(30, 41, 59, 0.8);
    padding: 20px;
    display: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.experience-content.active {
    display: block;
}

.experience-details, .experience-details p, .experience-details ul, .experience-details li {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.experience-details ul {
    margin-left: 20px;
}

.company-image {
    float: right;
    width: 80px;
    height: 80px;
    margin: 0 0 10px 15px;
    border-radius: 5px;
}

/* Home Page */
.body-home {
    background-image: url('../imgs/home-background-img.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.home-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 120px);
}

.home-header {
    text-align: center;
}

.profile-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    position: absolute;
    top: 40px;
    left: 40px;
    object-fit: cover;
}

.social-links {
    text-align: center;
    margin-bottom: 40px;
}

.social-links h3 {
    font-size: 16px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    font-size: 24px;
    color: var(--text-primary);
    text-decoration: none;
}

/* Expertise Page */
.background-overlay {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-image: url('../imgs/html-code-img.png');
    background-size: 50%;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 0;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
    margin: 0 auto;
    border: 2px solid var(--text-primary);
    backdrop-filter: blur(3px);
}

.expertise-card {
    padding: 30px 25px;
    text-align: left;
}

.expertise-card:not(:last-child) {
    border-right: 2px solid var(--text-primary);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    line-height: 1.2;
}

.software-engineer .card-title { background: linear-gradient(to top, #60a5fa 66%, transparent 66%); }
.hardware-engineer .card-title { background: linear-gradient(to top, #f59e0b 66%, transparent 66%); }
.frontend-dev .card-title { background: linear-gradient(to top, #ef4444 66%, transparent 66%); }

/* Contact Page */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-header {
    grid-column: 1 / -1;
    margin-bottom: 3rem;
    text-align: left !important;
}

.contact-form {
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--accent-tertiary);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Testimonials */
.testimonials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}

.testimonial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    border-radius: 16px;
}

.testimonial:hover {
    transform: translateY(-2px);
}

.testimonial:nth-child(1) { 
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    grid-row: 1 / -1;
}
.testimonial:nth-child(2) { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); }
.testimonial:nth-child(3) { background: linear-gradient(135deg, #10B981 0%, #059669 100%); }

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

.testimonial-text {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

/* Projects Page Layout */
.projects-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.iphone-showcase {
    width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    perspective: 1000px;
    position: sticky;
    top: 0;
    height: 60vh;
}

.iphone {
    width: 300px;
    height: 600px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 50px;
    position: relative;
    box-shadow: 
        0 0 0 8px #333,
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 0 0 2px #444;
    animation: spin 8s linear infinite;
}

.screen {
    position: absolute;
    top: 40px;
    left: 20px;
    right: 20px;
    bottom: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
}

/* Animations */
@keyframes spin {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes screenGlow {
    0% { opacity: 0.8; }
    100% { opacity: 1; text-shadow: 0 4px 20px rgba(255,255,255,0.5); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-section, .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    .expertise-card:not(:last-child) {
        border-right: none;
        border-bottom: 2px solid var(--text-primary);
    }
    
    .expertise-header, .projects-header {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .header, .main-content {
        padding: 15px 20px;
    }
    
    .projects-header {
        font-size: 40px;
    }
    
    .navigation {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .form-row, .testimonials {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .name-heading {
        font-size: 60px;
    }
    
    .iphone-showcase {
        position: static;
        height: auto;
        width: 100%;
    }
}

/* Alignment Utilities */
.align-left {
    text-align: left !important;
}